473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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=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
Aug 13 '07 #1
6 1233
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:\Database1.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(RTM.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:\Database1.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(RTM.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
by: Dotnetified | last post by:
Reposting after about 2 weeks of no response ... thanks if you can help... ---------------------------------------------------------------------------- -------------- To anyone who thinks they...
8
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...
3
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.