Forum Discussion

SaravanaKumar_N's avatar
SaravanaKumar_N
Contributor
7 years ago

TestComplete x64 - ODBC Driver Connectivity Issue

Hi,

 

I want to make a connection to Excel file and get the data, but I could not find a solution for TC x64 bit. So I am approaching you all.

I get the error message - " [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

 

TC - 12.41 64 bit

OS - Windows Server 2008 R2 64 bit

MS Excel - 32bit

I did follow the steps given here about installing - 64-bit version of Microsoft Office 12.0 Access Database Engine.

Also renamed the regedit "mso.dll" to "mso1.dll"

https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/excel-storages.html

 

Connection string used ...

var ConnStr = "DRIVER={Microsoft Excel Driver (*.xls)};DBQ=" + filePath + ";ReadOnly=1;";
adoConn.Connection = Sys.OleObject("ADODB.Connection");
adoConn.Connection.ConnectionString = ConnStr;
adoConn.Connection.Open();

 

 

If I use the TC - 12.41 32 bit version in the same box, I am able to connect and get the data from Excel file.

Not sure what I am missing here, any advice would be helpful for us.

 

Thanks

  • tristaanogre's avatar
    tristaanogre
    7 years ago

    You need to make sure, then, that in your connection string, you're referencing the 64-bit ODBC driver... I'm assuming it has a slightly different name.  Do that, and you can use the 64-bit TestComplete

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    If you're using an ODBC driver, you need to make sure that the ODBC driver you selected is for 64-bit.  The 64 bit access installation that you added is for ADO connections that use the JET database driver.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        No, I don't think that's it.  That's the same data access components mentioned in the previous article.

         

        In your OS, you should have ODBC data sources for both 64-bit and 32-bit.  You're using the one for 32-bit in the 64-bit TestComplete.  That's why you're getting the problem.

         

        Note, however, that you don't HAVE to run your tests in 64-bit.  TestComplete works, functionally, exactly the same regardless of bitness.  If you can't find the proper ODBC data source to use, you should be fine running as 32-bit.