473,882 Members | 1,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

repost of an old question on a problem with Access connection...

When I asked this question before, don't think I was showing up as an MSDN
subscriber, so I hope that is fixed now.

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=Micros oft.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
Aug 13 '07 #1
6 1263
Hi Terry,

Based on my understanding, you can add a connection to a Access database
file in VS.NET2003, but couldn't do this in VS2005. If I'm off base, please
feel free to let me know.

I performed a test in VS2005, but didn't reproduece the problem on my side.
The following is the steps of my test.

1. Create an Access database file called Database1.mdb and save it to the
root path of D:\.

2. Open VS2005. In the Server Explorer, right click the 'Data Connections'
node and choose 'Add Connection'.

3. In the 'Add Connection' dialog, if the text in the 'Data source' textbox
isn't 'Microsoft Access Database File(OLE DB)', click the 'Change' button
and 'Change Data Source' dialog appears. In this dialog, select 'Microsoft
Access Database File' in the 'Data source' list(at this time, the below
'Data Provider' combobox only contains '.NET Framework Data Provider for
OLE DB'), and press OK and return to the 'Add Connection' dialog.

4. In the 'Add Connection' dialog, click the 'Browse' button to browse to
the Database1.mdb file and press OK.

5. A new node 'Access.D:\Data base1.mdb' appears under the 'Data Connection'
node in the Server Explorer.

The version of VS2005 on my machine is Visual Studio 2005 Team Suite
Version 8.0.50727.42(RT M.050727-4200). What's the version of VS2005 on your
machine?

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 14 '07 #2
Hi Linda,
This is a strange problem. I originally posted this in June, but there
was a problem with my no-spam alias and the one registered with my MSDN
subscription, so I got no answeres back then. Also, at that time, I found 2
other threads discussing the same problem. In one of those threads, the
problem suddenly went away - very strange. In my case, I uninstalled VS2005
and reinstalled it and the problem was still there. I tried at least 40-50
times to create a data source from an access database and could not do it
using the OLEDB Jet 4 provider. I got around the problem by setting up an
ODBC connection.
Yesterday, I saw someone having a problem with "Object reference not set
to an instance of an object." and was reminded that I had never got an answer
to the original question, so I reposted it now that my no-spam alias problem
was fixed.
After reposting it, I went in and tried it again and guess what - the
problem had gone away! So just like the other thread, somehow it had fixed
itself. Very strange.
So on my machine, it had originally worked, stopped working for at least
2 weeks and sometime after that started working again and I have no idea how
or why. I do know that I am not the only one who has expierenced this same
behavior. You might want to look for these other threads in the archives,
they were the exact same problem I had.
--
Terry
"Linda Liu [MSFT]" wrote:
Hi Terry,

Based on my understanding, you can add a connection to a Access database
file in VS.NET2003, but couldn't do this in VS2005. If I'm off base, please
feel free to let me know.

I performed a test in VS2005, but didn't reproduece the problem on my side.
The following is the steps of my test.

1. Create an Access database file called Database1.mdb and save it to the
root path of D:\.

2. Open VS2005. In the Server Explorer, right click the 'Data Connections'
node and choose 'Add Connection'.

3. In the 'Add Connection' dialog, if the text in the 'Data source' textbox
isn't 'Microsoft Access Database File(OLE DB)', click the 'Change' button
and 'Change Data Source' dialog appears. In this dialog, select 'Microsoft
Access Database File' in the 'Data source' list(at this time, the below
'Data Provider' combobox only contains '.NET Framework Data Provider for
OLE DB'), and press OK and return to the 'Add Connection' dialog.

4. In the 'Add Connection' dialog, click the 'Browse' button to browse to
the Database1.mdb file and press OK.

5. A new node 'Access.D:\Data base1.mdb' appears under the 'Data Connection'
node in the Server Explorer.

The version of VS2005 on my machine is Visual Studio 2005 Team Suite
Version 8.0.50727.42(RT M.050727-4200). What's the version of VS2005 on your
machine?

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 14 '07 #3
Hi Terry,

Thank you for your prompt response.

Microsoft Jet Database Engine is shipped with Windows Operation System. In
the %windir%/System32 folder, there's a dll file named 'msjet40.dll'. From
the property of the file, you could see the versions of the file.

The following KB article discusses how to obtain the latest service pack
for the Microsoft Jet 4.0 Database Engine and how to determine the current
release level of Jet 4.0:

http://support.microsoft.com/kb/239114/

If your problem happens again in the future, you may have a try installing
the lastest service pack for the Microsoft Jet 4.0 Database Engine.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

Aug 17 '07 #4
Hi Terry,

Sorry for my delayed reply!

I know you made great effort trying to solve this problem and I appreciate
your detailed feedback on our product.

We will log this issue in our internal database for better product in the
future.

If the problem happens again in the future, please feel free to post a new
thread and we're here to support you at your convenience.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support

Aug 17 '07 #5
Hi Terry,

Thank you for your prompt response.

Microsoft Jet Database Engine is shipped with Windows Operation System. In
the %windir%/System32 folder, there's a dll file named 'msjet40.dll'. From
the property of the file, you could see the versions of the file.

The following KB article discusses how to obtain the latest service pack
for the Microsoft Jet 4.0 Database Engine and how to determine the current
release level of Jet 4.0:

http://support.microsoft.com/kb/239114/

If your problem happens again in the future, you may have a try installing
the lastest service pack for the Microsoft Jet 4.0 Database Engine.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

Aug 17 '07 #6
Thank you Linda for your help with this. Hopefully it will not happen again,
but maybe this will help the next person who happens to run accross it.
--
Terry
"Linda Liu [MSFT]" wrote:
Hi Terry,

Thank you for your prompt response.

Microsoft Jet Database Engine is shipped with Windows Operation System. In
the %windir%/System32 folder, there's a dll file named 'msjet40.dll'. From
the property of the file, you could see the versions of the file.

The following KB article discusses how to obtain the latest service pack
for the Microsoft Jet 4.0 Database Engine and how to determine the current
release level of Jet 4.0:

http://support.microsoft.com/kb/239114/

If your problem happens again in the future, you may have a try installing
the lastest service pack for the Microsoft Jet 4.0 Database Engine.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

Aug 20 '07 #7

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

Similar topics

0
2318
by: Dotnetified | last post by:
Reposting after about 2 weeks of no response ... thanks if you can help... ---------------------------------------------------------------------------- -------------- To anyone who thinks they know it all: ;) We recently upgraded our MSDN Version of VS.NET 2002 to VS.NET 2003... Things are all working well, except we've run across a new bug or issue since our adopting of the new package.
8
1772
by: Jozef | last post by:
Hello, When an Access program connects to a database, is there a unique connection id? I've used the User Roster to check connections, but just wondering if there was two machines with the same name, it would throw things off somewhat. Any help would be great. Thanks!
3
1391
by: Jeremy Ames | last post by:
Can someone please help with this? Unfortunately, that did not work. "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote in message news:uwMY%23fquDHA.2308@TK2MSFTNGP11.phx.gbl... Hi Jeremy, Please try using 127.0.0.1 instead of (local) in the connection string: cnTask.ConnectionString="Data Source=127.0.0.1;" +
5
2454
by: Adrian Parker | last post by:
I've got the standard SqlCacheDependency working just fine , ie. I've defined (and encrypted) the connectionStrings section in the web.config, and I've also defined an an sqlCacheDependency in the caching section. So, in my code I add an item to the cache with an sqlCacheDependency, referencing the named sqlCacheDependency in the web.config and the database table it is to be based on (have enabled notificiations for that table). Fine. ...
0
9931
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10829
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10403
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9556
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7955
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7113
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3226
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.