Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 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!
 External Development Forums - SalesLogix OLEDB Provider
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: Error while generating ID through slx_dbids proc
Snehal
Posts: 3
 
Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 May 07 9:30 PM
fiogf49gjkf0d
Hi Guys,

I am using following C# code to generate new id for the account table. This code is being called from an .aspx page.

String conStr = "Provider=SLXOLEDB.1;Data Source=SLOGIX2;User ID=Adminassword=a:zzz;SLX Server=SLOGIX2;";
_slxConnection = new OleDbConnection(conStr);
_slxConnection.Open();
OleDbCommand cmd = new OleDbCommand("slx_dbids('Account', 1)", _slxConnection);
ret = cmd.ExecuteScalar().ToString();
_slxConnection.Close();

I am consistently getting following exception:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
System.Data.Common.ICommandText.Execute(IntPtr pUnkOuter, Guid& riid, tagDBPARAMS pDBParams, IntPtr& pcRowsAffected, Object& ppRowset) +0
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +103
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +192
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +48
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +106
System.Data.OleDb.OleDbCommand.ExecuteScalar() +116

Can someone help me troubleshoot what is wrong in my code? I have installed OLE DB Provider as well as sales logix client on the machine.

Any help is highly appreciated.
[Reply][Quote]
Rick Smith
Posts: 96
 
Re: Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 07 7:34 AM
fiogf49gjkf0d
I think that the parameters in the procedure are reversed - should be slx_dbids(1, 'Account')
See http://www.slxdeveloper.com/page.aspx?id=35&articleid=11

[Reply][Quote]
Snehal
Posts: 3
 
Re: Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 07 7:53 AM
fiogf49gjkf0d
Hi Rick,

Thanks for the response but all documentation I had read mentioned I need to call slx_dbids('Accoun',1). The article you are referring to also mentions to pass table name first and then the number of ids to generate.

Thanks.
[Reply][Quote]
Rick Smith
Posts: 96
 
Re: Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 07 9:21 AM
fiogf49gjkf0d
Yes, sorry, I was looking at some code before enough coffee was consumed...
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 07 12:13 PM
fiogf49gjkf0d
Your connection string is not right. Take a look at this article and make the necessary changes:
http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=55

-Ryan
[Reply][Quote]
Snehal
Posts: 3
 
Re: Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 07 4:06 PM
fiogf49gjkf0d
Hi Ryan,

My current connection string is

String conStr = "Provider=SLXOLEDB.1;Data Source=SLOGIX2;User ID=Adminassword=a~zzz;SLX Server=SLOGIX2;";

My password is actually a:zzz but I think forum converts :z into the similey face.

When I compared this with what you have in the article I noticed following differences:
1) Does password need to be in enclised in quotes?
2) Are "Persist Security Info" and "Extended Properties" properties required?

Please let me know what I am missing.



[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Error while generating ID through slx_dbids procYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 07 4:20 PM
fiogf49gjkf0d
The password isn't the problem. Read the article again on the SLX connection string. There is no such parameter named "SLX Server" for SLX connection strings as you have in yours. You need to specify a SLX server with the "Data Source" parameter and the database (as defined on the SLX server) using the "Initial Catalog" parameter.

Make sense?
[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/26/2024 8:33:30 AM