Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: Cann't create ID within ASP.net
Tracy
Posts: 5
 
Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 07 11:37 PM
I made reference to the http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=87

Ryan, Thank you for the help. However, I failed test.

*----------------------------------------------------------------------------
string con = "Provider=SQLOLEDB.1ersist Security Info=False;User ID=sysdba ;password=masterkey;Initial Catalog=CSI_backup;Data Source=TRACY;Use Procedure for Prepare=1;Auto Translate=Trueacket Size=4096;Workstation ID=TRACY;Use Encryption for Data=False;Tag with column collation when possible=False" ;
string keyname = "ACCOUNT";
using (OleDbConnection conn = new OleDbConnection(con));
conn.Open();
using (OleDbCommand cmd = new OleDbCommand(string.Format("slx_dbids('{0}', 1)", keyname), conn))
{
this.TextBox1.Text = cmd.ExecuteScalar().ToString();
}
*---------------------------------------------------------------------------------

ERROR:Incorrect syntax near 'ACCOUNT'.
System.Data.OleDb.OleDbException: Line 1: Incorrect syntax near 'ACCOUNT'

Please help me,thanks
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 May 07 12:30 AM
To use slx_dbids, you need to connect to the database using the SLX OLEDB provider, not the standard SQL OLEDB provider. So you will also probably log in as ADMIN, not sysdba.

Whether the rest of your syntax is correct I'm not sure, but this is step 1.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 May 07 12:56 AM
Hi Tracy,

As Phil mentioned, you must establish a connection via the SLX provider to use the slx_dbids proc. Refer back to that aritlcle:

Quote:
The SLX_DBIDS procedure is a procedure you can call to create SalesLogix table ID values. It is not a database level procedure. You won't find it in the database. It exists in the SalesLogix provider only and therefore can only be used via a connection that is using the SalesLogix provider (to be clear, this means that the connection must use a SalesLogix connection string).


You can read more about the SLX connection string here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=55

Make sense?

-Ryan
[Reply][Quote]
Tracy
Posts: 5
 
Re: Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 May 07 2:43 AM

Thanks, RNAY and PHIL
I now succeeded I also have about .NET the question wants to ask you to help
Inserts the data in ASP.NET to SLX in
*-------------------------------------------------------------------------
OleDbConnection cn1=new OleDbConnection(Application["Constr"].ToString());
cn1.Open();
OleDbCommand cm1=new OleDbCommand("insert into aa values(@ab)",cn1);;
cm1.Parameters.Add(new OleDbParameter("@ab",OleDbType.Integer));
cm1.Parameters["@ab"].Value=2;
if(cm1.ExecuteNonQuery()==1)
{
this.TextBox1.Text = "OK!!!";
}
*--------------------------------------------------
Error:Must declare the variable '@ab'
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 May 07 1:35 PM
Quote:
Originally posted by Tracy


Thanks, RNAY and PHIL


Is that pig latin?

Timmus
[Reply][Quote]
Tracy
Posts: 5
 
Re: Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 May 07 8:26 PM
Sorry,My English is poor,i'm Chinese
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Cann't create ID within ASP.netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jun 07 12:17 PM
I was just teasing, Tracy. You mixed Ryan's name around and it reminded me of games we used to play as kids.

I hope I did not offend.

http://en.wikipedia.org/wiki/Pig_Latin

Timmus
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 4:19:24 PM