Forum Discussion

gerard_vandenbe's avatar
10 years ago

Test Complete 8.7 Connection String not working Windows 7 64bit

I need assistance with getting a connection string to work under Windows 7 64bit connecting to an Oracle 11g database. The following code used to work under Windows XP:





// Create a query 


Qry = ADO.CreateADOQuery() 


// Specify the connection string 


Qry.ConnectionString = "Provider=MSDAORA;Data Source=" 


Qry.ConnectionString += Project.Variables.VariableByName('gsDBName') + ";" 


Qry.ConnectionString += "User ID=" + Project.Variables.VariableByName('gsDBUsername') + "; " 


Qry.ConnectionString += "Password=" + Project.Variables.VariableByName('gsDBPassword') + ";" 


// Specify the SQL expression 


Qry.SQL = "SELECT MAX(DEALING_NUMBER) AS DEALING_NUMBER " 


Qry.SQL += "FROM SMR.DEALING " 


Qry.SQL += "WHERE ((DEALING_PREFIX = '" + sPrefix + "') " 


Qry.SQL += "AND ((DEALING_NUMBER >= " + strMin + ") " 


Qry.SQL += "AND (DEALING_NUMBER <= " + strMax + "))) " 


// Execute the query 


Qry.Open()






This is the error when executing line Qry.Open() An exception occurred in the "Script Name" unit at line xxx: Unspecified Error I have tried countless Connection string combinations which all give this same error. Please help. Gerard

2 Replies

  • Ravik's avatar
    Ravik
    Super Contributor
    Try this, may help you....




    To resolve ADODB connection issue ,follow the below steps:



    Open a  cmd prompt.

    Navigate to the path (C:\Windows\SysWOW64).

    Copy the script path.

    Click Enter.





    Instead of opening command line everytime,batch file can be created by following the below steps:



    Open a notepad

    Type "Call C:\Windows\SysWOW64  VBScript File Location and Name"

    Save the file as .bat file

    Double click on the file.