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: Confused about Slx Oledb provider with .net
Stephen Doherty
Posts: 4
 
Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jan 08 1:18 PM
Hello maybe someone can help me here.

What I am using:
SalesLogix 6.2.3.1053
Visual Studio 2005 sp1
SalesLogix Oledb Provider
Coding in C#

I am developing an application for my job and part of it will involve .net inserting records into our salesLogix DB.
I have created a new table in slx via the Administrator with the following fields (which you may not need but for the sake of completeness here they are)
PREURSTIID
CONTACTID
CREATEUSER
CREATEDATE
MODIFYUSER
MODIFYDATE
PRODUCTID
STATUS
REQUEST
RESPONSE
OWNER
COMPLETEDDATE
REQUESTEDDATE

My Connection string
Provider=SLXOLEDB.1;Data Source=slx62;Initial Catalog=sdslx62;User Id=myIDassword='myPASSWORD';

My Sql Statement (note I wrote this just to test the functionality out)
OleDbCommand OleCommand = new OleDbCommand("INSERT INTO MY_TABLE (ContactID,CreateUser,CreateDate,ModifyUser,ModifyDate,ProductID,Status,Request,Response,Owner,CompletedDate,RequestedDate)
VALUES ('C0XXUA000086','CreateUser','" + DateTime.Now + "','User','" + DateTime.Now + "','YQA4LA100009','In Progress','Fix Something','Fix it yourself','Chris Martis','" + DateTime.Now + "','" + DateTime.Now + "')", conn);

OleCommand.ExecuteNonQuery();

When this is executed it gives be a null error for the insert of this statement because I have not included my first field PREURSTIID which
is the field that I have set via the Administrator to be auto incrementing.

My connection is fine if I force some fake value and take off auto increment i can insert a record to the table. Obviously this will not sync with the
slx system and create the necessary files (TEFs). My question is what is the oledb doing if it is not performing the actions? Is there an error in how
I am inserting this. From all my research seems like it would just work like any other insert from a sql ADO connection (meaning no extra coding need for slx to do what it needs.) maybe i am wrong but if anyone can help me with this it will be greatly appreciated.







[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Jan 08 5:22 PM
After setting the field to be auto-incrementing, you probably need to stop and start the SLXServer service on the SLX app server before it will work.

PP
[Reply][Quote]
Stephen Doherty
Posts: 4
 
Re: Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Jan 08 12:21 PM
I have tried restarting the services and also have tried rebooting the server all together to no avail. It simply will not work for me.
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jan 08 7:55 AM
Steve,

I believe this is a custom table you are trying to get the ID to work in? If so, make sure the length of the ID field is 12 characters and is of type 'String'. If it is not 12 characters and not a String the SLX provider will not create an ID for it.

John G.
[Reply][Quote]
Stephen Doherty
Posts: 4
 
Re: Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jan 08 8:04 AM
I have set the PREURSTIID Field (which is my key) as a SLX Standard ID in field properties, which is a String of 12 characters when I look at the table in Saleslogix Database manager. Also I have noticed that this is the only field type where the auto increment check box is not greyed out.
[Reply][Quote]
Stephen Doherty
Posts: 4
 
Re: Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jan 08 8:44 AM
Dear John,
I did what you said "If you installed the provider only on the workstation, make sure you have applied the latest service pack on that workstation"
and this solved the problem. very strange problem but it makes sense when I think about. I appreciate all your help.
Thanks Again.

Steve D
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Confused about Slx Oledb provider with .netYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Jan 08 8:54 AM
Excellent! Glad to hear that resolved the issue!

John G.
[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 5:16:44 PM