ADO.NET OleDb connector problem with jet

  • Thread starter Thread starter David Thielen
  • Start date Start date
Is this a 64-bit system? If so, you're out of luck. See
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3840450&SiteID=1
I've seen this myself.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
 
You need to install Microsoft Access database engine 2007, if the computer
does not have Access2007 installed. Not like older version of Jet database
(*.mdb), which is accessed by Jet engine (coming with OS), *.accdb use MS
Access Database Engine, which does not come with OS. You need to installed
with Access, or download from MS site, in order to access *.accdb without
Access installed.
 
Hello Dave,

I agree with William and Norman's comments. The two points they mentioned
are the most possible problems in this case,

1.We don't have Office 2007 Jet drivers installed

2.We are running a 32 bit application in a default x64 environment

For the first case, we just need to download the 2007 Office System Driver
and install it. The download link is
http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-
9B72-EF94E038C891&displaylang=en

For the second issue, we need to set the Enable 32-Bit Applications option
to true in the IIS. Please refer the detailed steps in the following link
http://blog.nkadesign.com/2008/windows-2008-the-microsoftjetoledb40-provider
-is-not-registered-on-the-local-machine/

Please let me know if these two ways resolves your issue.

And another thing to point is, since the Access use the new file format
.accdb, it also uses a new database engine. So it is recommended to use the
ACE provider for .accdb while the Jet is for .mdb. See
http://www.connectionstrings.com/?carrier=access2007.


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

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://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
It's #2 - running in 64-bit Vista. This is not for IIS, this is for
our MS Office AddIn application.

What driver is best to use in this case, and do we need to configure
it special?

thanks - dave


Hello Dave,

I agree with William and Norman's comments. The two points they mentioned
are the most possible problems in this case,

1.We don't have Office 2007 Jet drivers installed

2.We are running a 32 bit application in a default x64 environment

For the first case, we just need to download the 2007 Office System Driver
and install it. The download link is
http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-
9B72-EF94E038C891&displaylang=en

For the second issue, we need to set the Enable 32-Bit Applications option
to true in the IIS. Please refer the detailed steps in the following link
http://blog.nkadesign.com/2008/windows-2008-the-microsoftjetoledb40-provider
-is-not-registered-on-the-local-machine/

Please let me know if these two ways resolves your issue.

And another thing to point is, since the Access use the new file format
accdb, it also uses a new database engine. So it is recommended to use the
ACE provider for .accdb while the Jet is for .mdb. See
http://www.connectionstrings.com/?carrier=access2007.


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

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://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Hello Dave,

If the IIS is not involved, we do not need any special configuration except
setting the compiler mode to "x86" from "Any CPU" in the project property
page. And for Access 2007 .accdb database, we should use the ACE instead of
JET. I have tested the following codes which work on my side,

System.Data.OleDb.OleDbConnection con = new
System.Data.OleDb.OleDbConnection();
con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:\Users\v-jzho\Desktop\Test.accdb; Persist Security
Info=False;";
System.Data.OleDb.OleDbCommand com = new
System.Data.OleDb.OleDbCommand();
com.Connection = con;
com.CommandText = "Select * from Table1";
con.Open();
int i = Convert.ToInt32(com.ExecuteScalar());

Please let me know if it works for you! Have a good day!


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

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

We can't use x86 because our product is a library we ship to others
and they want it running in 64-bit mode on 64-bit systems. How can I
access it in 64-bit mode?

thanks - dave


Hello Dave,

If the IIS is not involved, we do not need any special configuration except
setting the compiler mode to "x86" from "Any CPU" in the project property
page. And for Access 2007 .accdb database, we should use the ACE instead of
JET. I have tested the following codes which work on my side,

System.Data.OleDb.OleDbConnection con = new
System.Data.OleDb.OleDbConnection();
con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:\Users\v-jzho\Desktop\Test.accdb; Persist Security
Info=False;";
System.Data.OleDb.OleDbCommand com = new
System.Data.OleDb.OleDbCommand();
com.Connection = con;
com.CommandText = "Select * from Table1";
con.Open();
int i = Convert.ToInt32(com.ExecuteScalar());

Please let me know if it works for you! Have a good day!


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

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


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Hello Dave,

Sadly to say, there currently is no 64 bit version of the ACE Provider, and
as far as I know there is either not a plan for the 64 bit version. The
only way to work around this problem is to explicitly set x86 as the target
platform when we build our project. Actually, the 32 bits can be also used
in 64 bit version system as WOW64 mode.

And if we are working on an Office Add-in, the Add-in will also be run in
the 32 bit mode.

See the previous discussion about this in the newsgroup,
http://groups.google.com/group/microsoft.public.data.oledb/browse_thread/thr
ead/de03294509810d13/c717d82cedec2820?lnk=raot


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

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

For our AddIn you are right that we can use 32-bit mode. But for our
engine, that is called directly from the user's program and so it's
64-bit when the system is 64-bit.

It's almost like Microsoft wants Vista to fail as they have all these
things that are 32-bit only. We will tell our customers that it's
32-bit only.

thanks - dave


Hello Dave,

Sadly to say, there currently is no 64 bit version of the ACE Provider, and
as far as I know there is either not a plan for the 64 bit version. The
only way to work around this problem is to explicitly set x86 as the target
platform when we build our project. Actually, the 32 bits can be also used
in 64 bit version system as WOW64 mode.

And if we are working on an Office Add-in, the Add-in will also be run in
the 32 bit mode.

See the previous discussion about this in the newsgroup,
http://groups.google.com/group/microsoft.public.data.oledb/browse_thread/thr
ead/de03294509810d13/c717d82cedec2820?lnk=raot


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

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


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
If I have a 64 bit host can I virtualize part of the machine to install
ms access odbc drivers


in other words load up a virtual pc image in 32 bit mode just for the
sake of working around the inavailability of a 64 bit ms access odbc
driver.
 
If I have a 64 bit host can I virtualize part of the machine to install
ms access odbc drivers


in other words load up a virtual pc image in 32 bit mode just for the
sake of working around the inavailability of a 64 bit ms access odbc
driver.
 
Back
Top