Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, June 7, 2025 
 
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!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: Newbie question
sblackburn
Posts: 2
 
Newbie questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Sep 07 1:33 PM
Hi,

Can I simply use ADO.Net to insert records into a SLX database? I want to create a library that I can use either in a web or windows application that will collect contact information and insert it into the database.

What do I need installed on the "client" machine?
Do I need to login to the database as a specific user?
Aside from the "slx_dbids" function, are there any other functions that I need to use?

Any hints, clues or examples would be greatly appreciated.

thx...sonny
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Newbie questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Sep 07 2:03 PM
Yes.

You can use the ADO.NET's OleDB library to connect via the SalesLogix OLEDB Provider and write data thru it.

Now, if you mean using ADO.NET and the SQL Library then that is something different...

What do you need installed on the Client Machine?
The SLX OleDB Provider. It is found on the Installation CD, depending on the version you will find it by itself.

For Hints and Examples, there are several on the site, but here a couple that might be more applicable:
http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=35

http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=87
[Reply][Quote]
sblackburn
Posts: 2
 
Re: Newbie questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 07 9:47 AM
I must be doing something wrong, I receive a 'Fail to parse SQL' exception. Can anybody tell me what it is?

Here's the test code snipet I'm using:

private void InsertAccount(string acctId)
{
OleDbConnection conn = null;
OleDbCommand cmd = null;
StringBuilder query = new StringBuilder();
try
{
query.Append("insert into ACCOUNT ");
query.Append("(ACCOUNTID, TYPE, ACCOUNT, ADDRESSID, SHIPPINGID, SECCODEID, STATUS, ACCOUNTMANAGERID, CREATEUSER, CREATEDATE, ACCOUNT_UC) ");
query.Append("values ");
query.Append(string.Format("('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', {8}, '{9}', '{10})", acctId, "Patient", "Last, First", "a6UJ9A001G4Q", "a6UJ9A001G4Q", "F6UJ9A000005", "Prospective", "U6UJ9A00000N", "ADMIN", DateTime.Now, "Last, First"));
conn = new OleDbConnection(slxConnection);
cmd = new OleDbCommand(query.ToString(), conn);
conn.Open();
MessageBox.Show(query.ToString());
cmd.ExecuteScalar();
}
catch (Exception ex) { statusLabel.Text = ex.Message; MessageBox.Show(ex.ToString()); }
finally
{
if (cmd != null)
{
cmd.Dispose();
}
if (conn != null)
{
conn.Close();
}
}
}


thx...sonny
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Newbie questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 07 10:53 AM
In your snipet, it looks like there are more values than fields.

Also, you are passing the date as a string the SLX Provider wants it formated "YYYYMMDD HH:MM:SS".
[Reply][Quote]
Phil Sim
Posts: 16
 
Re: Newbie questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Sep 07 9:27 AM
Where is the SLX OleDB Provider on the Installation CD (for 7.2)?
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Newbie questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Sep 07 6:38 AM
Quote:
Originally posted by Phil Sim

Where is the SLX OleDB Provider on the Installation CD (for 7.2)?


It's the one that says:

Client OLE DB Provider

--
rjl
[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 © 2025 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): 6/7/2025 6:04:20 AM