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: Provider connects in ASP.NET but not Console application
Patrick Beaudette
Posts: 16
 
Provider connects in ASP.NET but not Console applicationYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Mar 11 1:02 PM
fiogf49gjkf0d

I have some C# code that I have used in an ASP.NET app to open an OleDbConnection to SalesLogix, and it connects just fine.  When I copied this code to a console application I am building, it doesn't work.  I get the error:


The 'SLXOLEDB.1' provider is not registered on the local machine.


The provider obviously is installed, because when I run the ASP.NET code in DevStudio with the same connection string, it connects with no problem at all.  I have included the code below.


...


 


        private string _connectionString;


        private OleDbConnection _conn;


 


        public SLX_DB()


        {


            _connectionString = ConfigurationManager.ConnectionStrings["SlxConnection"].ToString();


            _conn = new OleDbConnection(_connectionString);


            _conn.Open();


        }


...


I have already verified that the connection string is reading from the app.config correctly, and that it is identical in both the ASP.NET app and the console app.


Any help is appreciated.

 

[Reply][Quote]
Patrick Beaudette
Posts: 16
 
Re: Provider connects in ASP.NET but not Console applicationYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Mar 11 2:08 PM
fiogf49gjkf0d

I think I might have figured it out... when it writes to the error log, I noticed that the user is "N/A" - the console app is not running as a user, even though I am the one launching it, and since it isn't a user it can't see the driver.  At least, that's my guess.


Anyone know how I can either (a) get a console app to run with specific credentials, or (b) make the oledb provider available even when there isn't a user?

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Provider connects in ASP.NET but not Console applicationYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Mar 11 11:46 AM
fiogf49gjkf0d

Patrick:


Have you checked your Target CPU for the Console App?


If your target is x64 it won't find the provider, make sure that you set the Target for x86.


 


 

[Reply][Quote]
Patrick Beaudette
Posts: 16
 
Re: Provider connects in ASP.NET but not Console applicationYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Mar 11 1:07 PM

Yup that was it, thanks Raul.


 


It was set to "AnyCPU", but since I'm on a 64-bit it wasn't finding it.  Changed to x86 and works fine!  


 


 

[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 10:42:46 AM