Link to home
Start Free TrialLog in
Avatar of stellyuk
stellyuk

asked on

problem connecting with Access 2007

HI there,

Can any of you see anything wrong with this line:
<add name="Connection" providerName="Microsoft.ACE.OLEDB.12.0;" connectionString="Data Source=C:\Documents and Settings\Stelly\My Documents\ENVPR041-Amalgamation_ of_ Inventories\Environment_Applications_Inventory.accdb;Persist Security Info=False;"/>

When I use it I ge the error:

Unable to find the requested .Net Framework Data Provider.  It may not be installed.

I have been trying to do this for ages, but I can get any joy... I would really appriciate all the help that I can get with this :)

Stelly
Avatar of josgood
josgood
Flag of United States of America image

Sounds like the Microsoft Jet 4.0 OLE DB Provider is missing

http://support.microsoft.com/kb/821765
mentions, among other things (they're giving an example, of course)
Open a connection to the Access database
1.      On the View menu, click Server Explorer.
2.      In Server Explorer, right-click Data Connections, and then click Add Connection.
3.      In the Data Link Properties dialog box, click the Provider tab.
4.      In the OLE DB Provider(s) list, click Microsoft Jet 4.0 OLE DB Provider, and then click Next.
5.      Click the Connection tab, and then click the ellipses button (...).
6.      Locate the Access database testdb.mdb file that you created by following the corresponding path on your computer.
7.      Select the testdb.mdb file, and then click Open.
8.      In the Data Link Properties dialog box, click OK.

Avatar of stellyuk
stellyuk

ASKER

Ok I have this connection string now...
<add name="Connection" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Data Source=C:\Applications_Inventory.accdb;Persist Security Info=True" providerName="System.Data.OleDb"/>

I'm now getting "Not a valid file name" any ideas? I'm trying to access a Access 2007 database...

Stelly
You've already checked and C:\Applications_Inventory.accdb really exists.

I suggest either using double backslashes "C:\\Applications_Inventory.accdb" or preceding the string with an "at" sign, as in @"C:\Applications_Inventory.accdb"

Joe
I have checked, and I'm getting the same error after changing the connection string to:

<add name="Connection" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Data Source=J:\\Applications_Inventory.accdb;Persist Security Info=True" providerName="System.Data.OleDb"/>

Any ideas?

Stelly
Can anyone help pls?

Stelly
Silly us. "Data Source=Data Source="

ASKER CERTIFIED SOLUTION
Avatar of josgood
josgood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial