Results 1 to 9 of 9

Thread: OleDB - 64 bit compatability

  1. #1

    Thread Starter
    Hyperactive Member Quasar6's Avatar
    Join Date
    Mar 2008
    Location
    Sol 3
    Posts
    325

    OleDB - 64 bit compatability

    Hi all.

    [C# 2008 Pro] [MS Access 2003 *.mdb] [OleDB Connection]

    I have built a database-interface program for my employer which works fine on 32 bit systems (including Vista 32 bit), but I need it to also work on 64 bit systems. When I install it on the only Vista 64 bit machine we have in this office, I get the attached error.

    The error is thrown when TableAdapter.Fill() is called for the first time. Do I need to install something on the other 64 bit machines first, or do I need to make changes to my dataset?

    Thanks.

    (Error details copied in full for the sake of providing all information)
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
    at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
    at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
    at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
    at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.OleDb.OleDbConnection.Open()
    at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
    at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
    at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
    at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
    at Virtual_Model.VirtualModelDataSetTableAdapters.MainTableAdapter.Fill(MainDataTable dataTable)
    at Virtual_Model.Form1.Form1_Load(Object sender, EventArgs e)
    at System.Windows.Forms.Form.OnLoad(EventArgs e)
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl()
    at System.Windows.Forms.Control.WmShowWindow(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Virtual Model
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Virtual%20Model/5.00/Virtual%20Model.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3074 (QFE.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Tekla.Structures.Model
    Assembly Version: 2.0.2.0
    Win32 Version: 2.0.2.105
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Tekla.Structures.Model/2.0.2.0__2f04dbe497b71114/Tekla.Structures.Model.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    Tekla.Structures
    Assembly Version: 2.0.2.0
    Win32 Version: 2.0.2.105
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Tekla.Structures/2.0.2.0__2f04dbe497b71114/Tekla.Structures.dll
    ----------------------------------------
    System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    Akit5
    Assembly Version: 5.0.6.0
    Win32 Version: 5.0.6.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Akit5/5.0.6.0__a70cba4ef557ee03/Akit5.dll
    ----------------------------------------
    System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    Attached Images Attached Images  
    "Why do all my attempts at science end with me getting punched by batman?" xkcd.

    |Pong||
    Sorry for not posting more often.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: OleDB - 64 bit compatability

    The message is clearly telling you that "the 'Microsoft.Jet.OLEDB.4.0' provider" is not installed.

    You might be able to get a 64 bit version of it via the link in my signature, but it is more likely that instead you will need to change from JET to ACE (via the same link, connection string examples via the apt link).

  3. #3

    Thread Starter
    Hyperactive Member Quasar6's Avatar
    Join Date
    Mar 2008
    Location
    Sol 3
    Posts
    325

    Re: OleDB - 64 bit compatability

    Thanks Si. I gathered that the Jet.OLEDB.4.0 provider wasn't installed, but I didn't know where to go from there.

    I've changed my Data provider and connection string over to ACE, and now get a similar error with "ACE" instead of "Jet." I then tried downloading the2007 Office System Driver: Data Connectivity Components and the Microsoft Data Access Components (MDAC) 2.8 SP1, but I still get that error. I'm not sure what to do next. Can you help? What am I still missing?
    "Why do all my attempts at science end with me getting punched by batman?" xkcd.

    |Pong||
    Sorry for not posting more often.

  4. #4

    Thread Starter
    Hyperactive Member Quasar6's Avatar
    Join Date
    Mar 2008
    Location
    Sol 3
    Posts
    325

    Re: OleDB - 64 bit compatability

    Hey guys. I found an alternative (and rediculously simple) solution here: Simply compile for x86 instead of the default "Any CPU."

    Oddly enough, I'm having no trouble running it on 32-bit systems, even after compiling it like that.

    If there's any reason this solution is less than optimal, I'd appreciate knowing about it. Otherwise, I'll just call it resolved and move on.

    Thanks for helping!
    "Why do all my attempts at science end with me getting punched by batman?" xkcd.

    |Pong||
    Sorry for not posting more often.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: OleDB - 64 bit compatability

    There is no 64-bit Jet or ACE Provider yet. To use Jet/ACE technologies requires that you compile for 32-bit Windows.

    This may change with the next MS Access release.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: OleDB - 64 bit compatability

    When you compile for Any CPU, your app will run in 32-bit mode on a 32-bit machine and in 64-bit mode on a 64-bit machine.

    When you compile for x64, your app will not run on a 32-bit machine and it will run in 64-bit mode on a 64-bit machine.

    When you compile for x86, your app will run in 32-bit mode on 32-bit and 64-bit machines.

    When your app is running in 64-bit mode it will only use 64-bit libraries. As has been said, there is no 64-bit version of Jet or ACE so, if your app is running in 64-bit mode, it fails to find the required library because no such library is installed. If your app is running in 32-bit mode, regardless of the OS type, then it will successfully find and use the 32-bit Jet or ACE library you have installed.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    New Member
    Join Date
    May 2010
    Posts
    7

    Re: OleDB - 64 bit compatability

    I have an application that uses Jet and has been compiled to x86 (32-bit) and it works fine on 32-bit OS's, but it won't on my 64-Bit os, from what i have read it should work on my 64-bit os in 32-bit mode but does't i just get the:

    The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

    Error message.

    Anyone have any ideas?
    Thanks

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: OleDB - 64 bit compatability

    Quote Originally Posted by pedders View Post
    I have an application that uses Jet and has been compiled to x86 (32-bit) and it works fine on 32-bit OS's, but it won't on my 64-Bit os, from what i have read it should work on my 64-bit os in 32-bit mode but does't i just get the:

    The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

    Error message.

    Anyone have any ideas?
    Thanks
    Either that machine doesn't have Jet installed, which is unlikely, or your app is not running in 32-bit mode. Are you absolutely sure you targeted the x86 platform? I suggest that you double check. You might also put some code in your app to specifically check what mode it's running in.

    http://www.vbforums.com/showthread.php?t=613889
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  9. #9
    New Member
    Join Date
    May 2010
    Posts
    7

    Re: OleDB - 64 bit compatability

    I'm pretty certain.

    I've added <PlatformTarget>x86</PlatformTarget> into the <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> section of my .VBPROJ file.
    And into the <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

    And it now compiles correctly.

    I've also downloaded the Beta of MS Office 2010 Access DB engine from http://www.microsoft.com/downloads/d...displaylang=en

    This also appears to work.

    Pedro
    Last edited by pedders; May 25th, 2010 at 03:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width