Problems connecting Visual Studio to MS Access Database

M

M Skabialka

I am trying to teach myself Visual Basic using online lessons and books,
using VS2005.
I created a new project, a windows forms app, with nothing in it yet but the
empty form. Following the lesson plan I chose Data, Add New Data Source,
highlighted 'Database', Next
An error message comes up immediately: "An unexpected error has occured.
Error Message: Object reference not set to an instance of an object."
I had planned on connecting to a copy of the Northwind Access database.

Another error I encountered was "Format of the initialization string does
not
conform to specification starting at index 0."

I have tried researching this but in most cases there seems to be some code
that crashes - but this database is empty - I haven't written any code yet
other than what VS creates automatically.

Is there something wrong with the way I installed Visual Studio? Is it a
bug? Did I miss a step you have to do before you can connect to a data
source? Is the problem the fact that I have an .mdb database but I am
running Access 2007 on the PC?

My questions on the Visual Studio newsgroups have gone unanswered.
Mich
 
P

PvdG42

M Skabialka said:
I am trying to teach myself Visual Basic using online lessons and books,
using VS2005.
I created a new project, a windows forms app, with nothing in it yet but
the
empty form. Following the lesson plan I chose Data, Add New Data Source,
highlighted 'Database', Next
An error message comes up immediately: "An unexpected error has occured.
Error Message: Object reference not set to an instance of an object."
I had planned on connecting to a copy of the Northwind Access database.

Another error I encountered was "Format of the initialization string does
not
conform to specification starting at index 0."

I have tried researching this but in most cases there seems to be some
code
that crashes - but this database is empty - I haven't written any code yet
other than what VS creates automatically.

Is there something wrong with the way I installed Visual Studio? Is it a
bug? Did I miss a step you have to do before you can connect to a data
source? Is the problem the fact that I have an .mdb database but I am
running Access 2007 on the PC?

My questions on the Visual Studio newsgroups have gone unanswered.
Mich

Which edition of VS 2005 are you using?
 
C

Clifford Bass

Hi,

Testing in VS2008 works for me. I am also able to set up Data sets in
VS2003. I am not able to test VS2005. Do I understand correctly that it
does not even let you choose the database? If that is the case, it could be
that something is missing from your install of Visual Studio. Rerun the
setup and make sure to do a complete install. Then make sure you install all
available service packs and updates. See if that fixes the problem.

Clifford Bass
 
M

M Skabialka

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727 SP2
Installed Edition: Standard
Microsoft Visual Basic 2005
Microsoft Visual Studio 2005 Tools for Applications

Does this answer your question?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top