none
64-bit MSDASQL

    Question

  • Hi,

     

        I got the 64-Bit MSDASQL through the following link and install it on Windows xp 64-bit:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=000364db-5e8b-44a8-b9be-ca44d18b059b&displaylang=en 

     

    But

    _bstr_t strConnect="Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=C:/test/test.mdb;";

    // create Connection object

    m_pConnection.CreateInstance("ADODB.Connection");

    hr =m_pConnection->Open(strConnect,"","",NULL);

    ...

    I always get the error "Data source name not found and no default driver specified". I'm sure the test.mdb file exists and the code works well on windows xp 32-bit but fails on Window xp 64-bit even I install the above package. Anybody can help me? Thanks!!

     

    Tuesday, May 06, 2008 5:02 AM

Answers

  •  

    Jet is a desk top database engine (msjet40.dll), which you can access via either odbc or oledb.

     

    ODBC app -> Jet ODBC Driver -> Jet Engine

    ADO/OLEDB app -> Jet OLEDB provider -> Jet Engine

    ADO/OLEDB app -> MSDASQL (OLEDB/ODBC bridge) -> Jet ODBC Driver -> Jet Engine

     

    Jet Engine itself does not support 64bit at the moment (Microsoft Jet Database Engine - Wikipedia, the free encyclopedia), hence there is no 64bit driver/provider.

     

    64bit MSDASQL is not only used for JetODBC, there are a lot of db engines out there that are being updated to support 64bit, but only come with 64bit odbc driver. Making MSDASQL available on 64bit windows enables connectivity from OLEDB/ADO based scenarios.

     

    Hope it helps this time Smile

    Thursday, May 08, 2008 7:35 AM
    Moderator

All replies

  • The link clearly states that the download is available for Windows 2003 only

     

    Were you able to go thorugh this download without any errors? Do you see msdasql.dll in both "\Program Files\Common Files\System\Ole DB" and "\Program Files (x86)\Common Files\System\Ole DB" locations?

    Tuesday, May 06, 2008 8:13 PM
    Moderator
  • Hi,

     

       Thanks for reply.

       1. Yes, I also noticed that the download filename is WindowsServer2003.WindowsXP-KB948459-v2-x64-enu.exe, so I guess whether it also supports windowsxp 64-bit, I install this package on Window xp 64-bit without any error. And I see msdasql.dll in the both folders you mentioned.

       2. And now I test it on my Windows Vista 64-bit with SP1 (which contains the 64-bit MSDASQL), but also get the error info, so I suspect whether the connection string(i.e. "Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=C:/test/test.mdb;"Wink has some problem for this case?

     

    Thanks in advance!

    Wednesday, May 07, 2008 1:49 AM
  •  

    Btw, I have checked  my Windows xp 64-bit and Window vista 64-bit, both of them has no ODBC driver for MS Access, does it mean even with 64-bit MSDASQL, I still cannot access Access(.mdb) file through ODBC? Thanks!
    Wednesday, May 07, 2008 2:10 AM
  •  

    1. Windows XP 64bit is actually the desk top version of WS2003, so the package actually would install on 64bit XP.

     

    2. 64bit MSDASQL will not solve the connectivity problem to Access mdb, as Jet engine itself is not supported for 64bit. As a result, there is no 64bit Access mdb Jet driver and a 64bit oledb/odbc bridge (msdasql) is not going to help much. If 64bit were supported for Jet, there would be 64bit Jet OLEDB provider and you could use oledb directly, the recommendation on 32bit windows.

     

    Hope this helps.

    Wednesday, May 07, 2008 6:51 AM
    Moderator
  • Hi,

    For point 2, in my understanding, Jet is an OLE provider instead of a driver(because it use Microsoft Access Driver(.mdb) as driver). So the problem lies in that even with 64-bit MSDASQL, but without 64-bit ODBC driver(such as Microsoft Access Driver(.mdb)), we still cannot access Access database file. Is my understanding correct? So is there any plan for 64-bit driver for accessing Access file(.mdb) from Microsoft, otherwise, the 64-ibt MSDASQL seems useless? Thanks 

     

    Wednesday, May 07, 2008 7:25 AM
  • The format of data source string is not correct,

    May you try like this ="Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\\tes\\test.mdb;";

    If it is not correct yet, add the account and password like this

    strConnect = _T("Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};"
            "Dbq=c:\\DatabasePath\\MyDatabase.mdb;Uid=MyUsername;Pwd=MyPassword;");
    Thursday, May 08, 2008 7:29 AM
  •  

    Jet is a desk top database engine (msjet40.dll), which you can access via either odbc or oledb.

     

    ODBC app -> Jet ODBC Driver -> Jet Engine

    ADO/OLEDB app -> Jet OLEDB provider -> Jet Engine

    ADO/OLEDB app -> MSDASQL (OLEDB/ODBC bridge) -> Jet ODBC Driver -> Jet Engine

     

    Jet Engine itself does not support 64bit at the moment (Microsoft Jet Database Engine - Wikipedia, the free encyclopedia), hence there is no 64bit driver/provider.

     

    64bit MSDASQL is not only used for JetODBC, there are a lot of db engines out there that are being updated to support 64bit, but only come with 64bit odbc driver. Making MSDASQL available on 64bit windows enables connectivity from OLEDB/ADO based scenarios.

     

    Hope it helps this time Smile

    Thursday, May 08, 2008 7:35 AM
    Moderator
  • Just so I am clear - the 64bit MSDASQL cannot be used with a 32 bit odbc driver?

    Friday, May 16, 2008 5:33 PM