11/29/2024 3:27:34 PM
|
|
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!
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
|
|
|
|
slx_dbids does not exist
Posted: 26 Sep 07 8:53 AM
|
I am trying to generate ids using the code samples provided. Here is my c# code:
private void button1_Click(object sender, EventArgs e) { String conStr = "Data Source=CDF-SalesLogix;Initial Catalog=Saleslogixersist Security Info=True; Provider=SQLOLEDB.1; User ID=sysdbaassword=masterkey; Extended Properties='PORT=1706;LOG=ON;'"; string ret = NewID("ACCOUNT", conStr); }
public string NewID(string table, string SlxConnectionString) { using (OleDbConnection conn = new OleDbConnection(SlxConnectionString)) { conn.Open(); using (OleDbCommand cmd = new OleDbCommand(string.Format("slx_dbids('{0}', 1)", table), conn)) { return cmd.ExecuteScalar().ToString(); } } }
But I keep getting "Syntax error near "ACCOUNT" Then, if I remove ('{0}', 1) It just tells me that the procedure slx_dbids doesn't exist.
I am running 7.01 - is this even available on 7.01?j
Thanks for any help! |
|
|
|
Re: slx_dbids does not exist
Posted: 26 Sep 07 11:39 AM
|
The slx_dbids procedure is not a SQL stored procedure. It exists in the SLX OLEDB provider only. To use it you must use a connection via the SLX provider.
Change your connection string to a SLX OLEDB Provider connection (instead of using a SQL connection) and it should work fine. |
|
|
|
Re: slx_dbids does not exist
Posted: 26 Sep 07 1:40 PM
|
As Ryan Mentioned you need to use the SLX oleDb Provider. Change your Provider to SLXOLEDB.1 , Your user ID to admin and Password to your Admin password. Assuming that your Initial Catalog is your Slx Connection name you should be good to go.
Mark |
|
|
|
Re: slx_dbids does not exist
Posted: 26 Sep 07 3:18 PM
|
My fault, I guess I didn't understand the difference between the two - I thought I WAS using the provider string I now see the difference! Thank you very much! |
|
|
|
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!
|
|
|
|
|
|
|
|