Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, November 10, 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: 'SLXOLEDB.1' failed with no error message available, result code: DB_E_ERRORSINCOMMAND
Clay Alberty
Posts: 7
 
'SLXOLEDB.1' failed with no error message available, result code: DB_E_ERRORSINCOMMANDYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 06 9:38 AM
fiogf49gjkf0d
I'm writing a data access layer assembly in C#/.NET 2.0, to be consumed by a web page.

I keep getting this error when attempting to insert a new record into a table in SLX. It's a custom table with a 1-1 relationship with the contact table. At first I was just using a tableadapter and performing an update, but I stripped it away layer by later until I was left with an oledb connection and oledb command object executing a hard-coded sql string that does work through Enterprise Manager. ExecuteNonQuery returns this result each time.

I have been reading around and tried changing all my date strings to ISO format, then completely removing the date strings from the command, but it does not appear to be a date issue. Select statements work fine. Update statements to existing rows also work fine.

Am I stuck using SqlClient methods instead? I cannot generate IDs easily without OLE and would really like to be able to use the OLEDB provider, but am close to giving up at this point. Any advice would be appreciated.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: 'SLXOLEDB.1' failed with no error message available, result code: DB_E_ERRORSINCOMMANDYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 06 10:04 AM
fiogf49gjkf0d
I do what you describe all the time in C#. It does work. Is there a section of code you could post for us to take a look at?
[Reply][Quote]
Clay Alberty
Posts: 7
 
Re: 'SLXOLEDB.1' failed with no error message available, result code: DB_E_ERRORSINCOMMANDYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 06 10:30 AM
fiogf49gjkf0d
Thanks for your reply.

Here is it, distilled down as far as I could get it. The sql statement runs fine in SQL management studio:

OleDbConnection conn = null;
try
{
conn = new OleDbConnection(Properties.Settings.Default.Saleslogix.ToString());

OleDbCommand cmd = new OleDbCommand();
cmd.Connection = conn;
conn.Open();
cmd.CommandText = "INSERT INTO Sysdba.WebUser ([CONTACTID],[CREATEUSER],[CREATEDATE],[MODIFYUSER],[MODIFYDATE],[USERPASSWORD],[PASSWORDSALT],[EMAIL],[PASSWORDQUESTION],[PASSWORDANSWER],[ISAPPROVED],[LASTLOGINDATE],[LASTPASSWORDCHANGEDDATE],[USERCOMMENT]) VALUES ('C6UJ9A00006H','ADMIN','09-15-2006 00:00:00','ADMIN','09-15-2006 00:00:00','5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8','','some@url.com','','','T','09-15-2006 00:00:00','09-15-2006 00:00:00','')";
cmd.ExecuteNonQuery();
}
finally
{
conn.Close();
}

Here's my connection string:

Provider=SLXOLEDB.1assword=passwordersist Security Info=True;User ID=admin;Initial Catalog=slx_dev;Data Source=servername;Extended Properties="PORT=1706;LOG=ON;CASEINSENSITIVEFIND=ON"

thanks again!
[Reply][Quote]
Clay Alberty
Posts: 7
 
Re: 'SLXOLEDB.1' failed with no error message available, result code: DB_E_ERRORSINCOMMANDYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 06 10:42 AM
fiogf49gjkf0d
Of course, five minutes after I post, I got it to work. The provider did not like the square brackets surrounding the column names.

This still does not answer why my table adapter did not work intially, on the other hand. I wonder if the date strings were killing it, I had to hand-write these to get the ISO format for testing. Have you had any experience with using strongly typed datasets against the SLX database like this?
[Reply][Quote]
Clay Alberty
Posts: 7
 
Re: 'SLXOLEDB.1' failed with no error message available, result code: DB_E_ERRORSINCOMMANDYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 06 11:34 AM
fiogf49gjkf0d
If anyone is having the same problem, figured I would post the final solution...

I originally let VS2005 generate the typed dataset and tableadapter based on the table def it pulled through the oledb provider. This actually was fine except for the SQL command it used. It automatically puts the database object name in quotes. I had to modify the ide-generated code behind the tableadapter to remove the \" strings from the insert command - worked like a charm after that. I did not end up having to hack the datetime objects, it converted System.DateTime to whatever SLX is looking for without any issues.

Cheers
[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/10/2024 2:03:00 PM