943,754 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 1406
  • C# RSS
Aug 11th, 2008
0

DB Provider

Expand Post »
I am trying to use an existing access db file with my c# app. When I try to connect, it says that:
"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."

How do I register it/install it/whatever it is I need to do to make it work?

Thanks.

I have Visual Studio 2008 with SQL Server 2005 Express installed if that helps.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
toadzky is offline Offline
96 posts
since Mar 2007
Aug 11th, 2008
0

Re: DB Provider

www.connectionstrings.com

use it, love it.
Reputation Points: 11
Solved Threads: 4
Light Poster
nvmobius is offline Offline
39 posts
since Jul 2008
Aug 12th, 2008
0

Re: DB Provider

You realize that the connection string format is not the issue right? I know how to format the string, it just can't find the provider.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
toadzky is offline Offline
96 posts
since Mar 2007
Aug 12th, 2008
0

Re: DB Provider

Um...

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Or in the case of one system I work on:

Data Source=HQNVSQL07;Initial Catalog=dxBugsDb;User Id=******;Password=******;

This is of course using System.Data.SqlClient.SqlConnection objects.

example:

C# Syntax (Toggle Plain Text)
  1. using ( System.Data.SqlClient.SqlConnection = new System.Data.SqlClient.SqlConnection(@"Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;") ) {
  2. // DO WORK
  3. }

As you can see, if it's SQL Server then you don't need a Provider.
Last edited by nvmobius; Aug 12th, 2008 at 3:41 am. Reason: Added sample code
Reputation Points: 11
Solved Threads: 4
Light Poster
nvmobius is offline Offline
39 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: SpliterContainer + C#
Next Thread in C# Forum Timeline: Inserting multiple records using DataGridView using C#





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC