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!
 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: Insert SQL statement
Lloy Sanders
Posts: 69
 
Insert SQL statementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Feb 07 8:00 AM
fiogf49gjkf0d
Hopefully this is one of those silly little things that I am missing, but I can't figure it out. I created a table using architect and am trying to insert rows using vb.net and the provider. Here is my SQL statement:

Insert Into Invoice_Run_Files (Invoice_Run_FilesId, Invoice_RunId, CreateUser, CreateDate, ModifyUser, ModifyDate, FileName, FileType, File_Order, File_Location) Values('QRFHQA0C2O1A', 'QRFHQA0C1X61', 'ADMIN', '20070215 08:42:00', 'ADMIN', '20070215 08:42:00', 'Pension Fund.doc', 'Cover Letter', 1, '\\TestServer\Finance\Invoices\2006\4Q\')

When I run this (using ExecuteNonQuery method of a SQLCommand object), I get this error:
String or binary data would be truncated. The statement has been terminated.

If I connect the table through ODBC in Microsoft Access and run the query, it will add the row, but the CreateDate and ModifyDate fields are set to NULL. The dates need to be in ISO format so they will sync. Any ideas on how to fix this?? Thanks.
[Reply][Quote]
Lloy Sanders
Posts: 69
 
Re: Insert SQL statementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Feb 07 8:41 AM
fiogf49gjkf0d
Ok, it was a silly little thing. My field File_Location was defined with a length of 36 and the string is 37 characters long. I still don't know why it works in Access, but does not like the dates, but it works now so I am happy.
[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:17:54 PM