S
surfrat_
Hi,
I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb
database. Please help me to sort this out.
Problem 1:
The Microsoft page "How to: Connect to Data in an Access Database"
http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the
following on how to connect to a Access database:
1. On the Data menu, click Add New Data Source.
2. Select Database on the Choose a Data Source Type page.
3. Select New Connection to create a new data connection.
Note
If the Data source is not Microsoft Access Database File, then select
Change to open the Choose/Change Data Source
dialog box, select Microsoft Access Database File, and then click
Continue.
4. The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source
Dialog Box.
5. In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database
file.
6. Enter login information if required by your database. For more
information, see Add/Modify Connection (Microsoft
Access).
7. Click OK, and then click Next.
In step 5 above it talks of a browse button. I dont't get that but
rather am given a dialog box titled Add Connection
and the only option is ConnectionString. I have tried all sorts of
options for a connect string but allways get the
error message "Format of the initialization string does not conform to
specification starting at index 0"
Problem 2:
automatically configure your connection and start the Data Source
Configuration Wizard ready for you to select the
objects to use in your application."
When I drag and drop drop an Access database eg. Northwind.mdb into the
Solution Explorer window I get the following
error: "An eror occurred while processing the local data file: Object
reference not set to an instance of an object"
Questions:
1. In problem 1 why don't I get the correct dialog with browse
functionality? I have Microsoft Visual Studio 2005
Professional installed on my Laptop and my main PC and they both do the
same thing. I have all patches and updates
installed.
2. How do I resolve problem 2? I have searched for a solution and and
have found none. I have uninstalled .Net
Framework 2 and reinstalled it with no difference. I think the two
problems are related.
Thanks very much for your help.
Surfrat.
I am having the following problems in getting Microsoft Visual Studio
2005 Professional to link to an Access .mdb
database. Please help me to sort this out.
Problem 1:
The Microsoft page "How to: Connect to Data in an Access Database"
http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the
following on how to connect to a Access database:
1. On the Data menu, click Add New Data Source.
2. Select Database on the Choose a Data Source Type page.
3. Select New Connection to create a new data connection.
Note
If the Data source is not Microsoft Access Database File, then select
Change to open the Choose/Change Data Source
dialog box, select Microsoft Access Database File, and then click
Continue.
4. The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source
Dialog Box.
5. In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database
file.
6. Enter login information if required by your database. For more
information, see Add/Modify Connection (Microsoft
Access).
7. Click OK, and then click Next.
In step 5 above it talks of a browse button. I dont't get that but
rather am given a dialog box titled Add Connection
and the only option is ConnectionString. I have tried all sorts of
options for a connect string but allways get the
error message "Format of the initialization string does not conform to
specification starting at index 0"
Problem 2:
Explorer into Solution Explorer toFrom the same page it states: "Drag an .mdf or .mdb file from Windows
automatically configure your connection and start the Data Source
Configuration Wizard ready for you to select the
objects to use in your application."
When I drag and drop drop an Access database eg. Northwind.mdb into the
Solution Explorer window I get the following
error: "An eror occurred while processing the local data file: Object
reference not set to an instance of an object"
Questions:
1. In problem 1 why don't I get the correct dialog with browse
functionality? I have Microsoft Visual Studio 2005
Professional installed on my Laptop and my main PC and they both do the
same thing. I have all patches and updates
installed.
2. How do I resolve problem 2? I have searched for a solution and and
have found none. I have uninstalled .Net
Framework 2 and reinstalled it with no difference. I think the two
problems are related.
Thanks very much for your help.
Surfrat.