Forum Discussion

Subbulakshmi's avatar
Subbulakshmi
Frequent Contributor
7 years ago
Solved

ADO Connection is not working

Hi,

 

While trying to connect to Ingress Database through Test Complete, Connection is not happening. 

 

set Conn =ADO.CreateADOConnection()

set Rec = ADO.CreateRecordset

Conn.ConnectionString = "Provider=MSDASQL;DRIVER=Ingres II Read Only;Data Source=LMK2 AUTO;SERVERTYPE=INGRES;Database=itvtestauto;User ID=itvsql;Pwd=W1llows"

Conn.LoginPrompt = False
Conn.Open()

log.message Conn.Connected

set Rec = Conn.Execute_("select * from sare")
log.Message Rec.rowCount

 Conn.Close

 

Conn.Connected returns False and whatever query we run using this connection is not executed.  Could you please help us in this scenario. 

  • AlexKaras's avatar
    AlexKaras
    7 years ago

    > Test complete version is 12.42. Machine is 64-bit machine.

    32-bit and 64-bit flavors of TestComplete are installed on 64-bit OSes.

    Help|About window in TestComplete will show you the current bitness.

    32-bit flavor of TestComplete can be found in <TestComplete>\bin\ folder while 64-bit flavor lives in the <TestComplete>\x64\bin\ one.

     

    > 32-bit driver(C:\Windows\SysWOW64)

    This means that you *must* use 32-bit TestComplete.

  • Subbulakshmi's avatar
    Subbulakshmi
    7 years ago

    Hi,

     

    The same commands worked when I executed the script in 32-bit test complete. Thanks a lot :) 

8 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I suspect that connection string is not correct. At least, samples at https://www.connectionstrings.com/ingres/ differ from yours.

    You can use https://community.smartbear.com/t5/TestComplete-Functional-Web/Can-anyone-help-me-how-to-access-Mongo-database/m-p/86460#M20415 approach to check if connection parameters are correct and it is possible to connect to the server and use final connection string in your test code in TestComplete than.

     

    Update: And yes, Robert is correct about bitness - you must use 32-bit driver and OLEDB provider for 32-bit TestComplete and 64-bit ones for TestComplete 64-bit. To deal with 32-bit DSNs you must start odbcad32 utility from <Windows>\SysWOW64 folder

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      So, if you're using a 32-bit driver but running a 64-bit copy of TestComplete, that, right there, could be another part of your problem.  Try running your code using the 32-bit version of TestComplete (available in the bin folder) and see if that improves things... of course, check your connection string as well as you could have two problems compounding each other.

    • Subbulakshmi's avatar
      Subbulakshmi
      Frequent Contributor

      Hi,

       

      Test complete version is 12.42. Machine is 64-bit machine. The database which we are trying to access is configured from 32-bit driver(C:\Windows\SysWOW64) location. I will check connection string. 

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        > Test complete version is 12.42. Machine is 64-bit machine.

        32-bit and 64-bit flavors of TestComplete are installed on 64-bit OSes.

        Help|About window in TestComplete will show you the current bitness.

        32-bit flavor of TestComplete can be found in <TestComplete>\bin\ folder while 64-bit flavor lives in the <TestComplete>\x64\bin\ one.

         

        > 32-bit driver(C:\Windows\SysWOW64)

        This means that you *must* use 32-bit TestComplete.

  • Subbulakshmi's avatar
    Subbulakshmi
    Frequent Contributor

    Hi Alex,

     

    Does the same project/Project suite will open in both Test complete versions?

     

     

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Yes, you should see no difference in running the tests in 32-bit versus 64-bit.

      • Subbulakshmi's avatar
        Subbulakshmi
        Frequent Contributor

        Hi,

         

        The same commands worked when I executed the script in 32-bit test complete. Thanks a lot :)