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
C#.NET ProgrammingASP.NET
Last Comment
josgood
8/22/2022 - Mon
josgood
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.
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
josgood
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"
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.