cancel
Showing results for 
Search instead for 
Did you mean: 

TC hangout after connect to DB

tuanvinh1008
Contributor

TC hangout after connect to DB

Hi all,

Could you help me check my code? I don't know reason why I can't open the DB

 

 

function ReturnQueryRecordSetFromStrin1() {
    var QueryString = "";
    try
    {
      ConnectionObject = ADO.CreateADOConnection();
      ConnectionObject.ConnectionString = BuildConnectionString();
      ConnectionObject.Open();
      //var cmn = ADO.CreateADOCommand();
      //cmn.ConnectionString = ConnectionObject;
      var RecordSet = ConnectionObject.Execute_("SELECT * FROM ACOUNT");
      Log.Message(RecordSet)
      ConnectionObject.Close();

      return RecordSet;
    }
    catch (e)
    {
      Log.Error("Error running QueryString. See Additional Information for QueryString value: " + e.message, aqConvert.VarToStr(QueryString))
      ConnectionObject.Close();
      return aqObject.EmptyVariant;
    }
}

 

 

after run it. at the ConnectionObject.Open() method, it displays the error and hangs out the TC.

 

tuanvinh1008_0-1619513834223.png

 

4 REPLIES 4
vinniew
Staff

Re: TC hangout after connect to DB

Hi @tuanvinh1008 

 

Hope you are well. 

 

The code looks good

 

I would open a ticket with our support team to check. 

 

Provide all the details you mentioned here.

 

In addition to this, please generate and provide an RG report from the machine in the support case. An RG report helps us know how the modules are behaving on the machine when the hanging occurs. To do this:
1) Run the Report Generator tool located in <TestComplete>\x64\Bin\ReportGenerator.exe (for the 64-bit tool version) or <TestComplete>\Bin\ReportGenerator.exe (for the 32-bit tool version).

 

KR

Vinnie

tuanvinh1008
Contributor

Re: TC hangout after connect to DB

Hi @vinniew , here is my RG report that you mentioned. Thanks,

Vinh

 

gurman
New Contributor

Re: TC hangout after connect to DB

In your connection string, which DB driver/provider are you using to establish connection with your DB? Is it a 64-bit driver or 32-bit driver? If you are using 64-bit driver, you need to make sure that you are running 64-bit version of testcomplete(inside x64 folder in installation directory). If you are using a 32-bit driver, you should be running 32-bit version of testcomplete.

tuanvinh1008
Contributor

Re: TC hangout after connect to DB

Hi @gurman  How to check the DB Driver/Provider? I'm using the 64x Testcomplete.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors