473,480 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem connecting to an Access DB

Hi,
I am a newbe here and am working through some books on using ADO.Net.
These database books were writen for VS2003. I have both VS2003 andVS2005.
In VS2003 all works fine. Right click 'Data Connections', select add new
connection, switch to 'Provider' tab and select
Provider=Microsoft.Jet.OLEDB.4.0, click Next, and browse to the Access mdf
file and all is ok.
In VS2005 this does not work! I right click 'Data Connections', select
add new connection. The Add Connections dialog appears, the Data Source is
preset to '.NET Framwork Data Provider for OLE DB'. I drop down the 'OLE DB
Provider' and select 'Microsoft Jet 4.0 OLE DB Provider'. Click 'Data
Links...', browse to the Access mdf file and hit ok. I test the connection
and it is OK. I hit the Ok button to finish the process and get the
following error message: Object reference not set to an instance of an
object.

Any/all help is greatly appreciated in advance.
--
Terry
Jun 14 '07 #1
1 1479
This getting damn frustrating!
I have read in the documentation that I can drag the .mdb file to solution
explorer and get a connection, but when I try this I gfet the same error.
The database icon is there but no schema file.
I also read in the documentation that I can do the following:

On the Data menu, click Add New Data Source.

Select Database on the Choose a Data Source Type page.

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.
The default provider is .NET Framework Provider for OLE DB. For more
information, see Choose/Change Data Source Dialog Box.

******In the Database file name box, enter the path to the .mdb file, or
click the Browse button to locate the database file.

Problem is that is not where I am taken after chosing Access DataBase File -
I am at a dialog asking for a connection string! And no matter what I put in
there, I get an error message thaqts says :

Format of the initialization string does not conform to specification
starting at index 0.

This should not be that hard! I can add ODBC data sources and sql data
sources but an Access database. This works fine in VS2003 but not in 2005 -
HELP!!!!
--
Terry
"Terry" wrote:
Hi,
I am a newbe here and am working through some books on using ADO.Net.
These database books were writen for VS2003. I have both VS2003 andVS2005.
In VS2003 all works fine. Right click 'Data Connections', select add new
connection, switch to 'Provider' tab and select
Provider=Microsoft.Jet.OLEDB.4.0, click Next, and browse to the Access mdf
file and all is ok.
In VS2005 this does not work! I right click 'Data Connections', select
add new connection. The Add Connections dialog appears, the Data Source is
preset to '.NET Framwork Data Provider for OLE DB'. I drop down the 'OLE DB
Provider' and select 'Microsoft Jet 4.0 OLE DB Provider'. Click 'Data
Links...', browse to the Access mdf file and hit ok. I test the connection
and it is OK. I hit the Ok button to finish the process and get the
following error message: Object reference not set to an instance of an
object.

Any/all help is greatly appreciated in advance.
--
Terry
Jun 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
12579
by: p cooper | last post by:
router root # perl -MCPAN -e 'install Net::SMTP' CPAN: Storable loaded ok LWP not available CPAN: Net::FTP loaded ok Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz...
4
3556
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into...
12
2750
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
1207
by: Willie | last post by:
Greeings all, I am unable to complete adding a Data Adapter to my application in VB .net. 1) I drag the adapter on to the form, 2) I select 'New Connection,' connect to the database table using...
4
7551
by: kthiagar | last post by:
Hi I am trying to connect to a password protected access file from VB.NET. I have no problem in connecting to Access, if I remove the password. This is what I am doing: In the server explorer,...
6
1686
by: Ecohouse | last post by:
I'm using Access 2002 and SQL 2000 on a stand alone computer and have created an Access Project connecting to an existing SQL database. All the tables and everything else in the SQL db is in the...
1
1880
by: Chris Love | last post by:
I have already asked this, but no one seems to know the answer. Here is the timeline. I wanted to use the membership/roles functionality in a site. I got all sorts of errors trying to get this...
2
4102
by: Patrick F | last post by:
Hi, i have SQL Server 2005 and a database set that is called, myCompany the problem is that i cant connect from my page to it, here is from the web.config: ( i have got this connectionstring from...
1
4316
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning:...
2
3003
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7092
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6981
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.