Re: Repost of an old question. Can not use Access in VS2005
- From: Gerry Hickman <gerry666uk@xxxxxxxxxxxxxxxx>
- Date: Tue, 19 Jun 2007 19:39:12 +0100
Hi,
I just tested Problem 1, and found it works as expected. I'm using VS2005 SP1 on Vista with Access 2007.
I've attached a screenshot of the dialog I see at step 5.
Terry wrote:
I posted a question in VB.net a week or so ago and got not responce. I found a post from March of this year with the same identical problem I have, and no one seems to have an answer. Is this abug? I have copied the earlier post and here it is:
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: =======
From the same page it states: "Drag an .mdf or .mdb file from Windows Explorer into Solution Explorer to 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.
Note: I have also had VS.NET 2003 in parallel on the same box, which had been uninstalled in the meantime. So I reinstalled VS 2005 too, but the problem remains. However ODBC for Access databases works, but this is not wanted.
--
Gerry Hickman (London UK)
- Follow-Ups:
- References:
- Prev by Date: Re: VS 2005 expands all projects during simple operations
- Next by Date: Re: C# Web form designer [Open source]
- Previous by thread: Repost of an old question. Can not use Access in VS2005
- Next by thread: Re: Repost of an old question. Can not use Access in VS2005
- Index(es):
Loading
