Forum Discussion

sunil_Rathore's avatar
sunil_Rathore
Occasional Contributor
9 years ago

An Attempt to work with Closed Driver in TC11.31

Hi,

 I am using Tc11.31 and I have a project that uses DDT.ExcelDriver. I use DDT ExcelDriver with While loop. after some time I got JScript runtime error "An attempt to work with a closed driver".please help to overcome this problem.....

 

  • There is a maximum number of connections that the Microsoft Jet database engine (the engine behind the scenes of the DDT objects) can have open at a time. If you're while loop is opening connections each time through the loop, you're probably maxing out the connections. Make sure that, when you're done with the data in the driver, you call the DDT.CloseDriver(<drivername>) method to close the connection.
  • dmiscannon's avatar
    dmiscannon
    Frequent Contributor

    Please provide some more details. If you could copy the code that uses the DDT and While loop someone may be able to identify the issue.

    • djadhav's avatar
      djadhav
      Regular Contributor

      Even though I don't know what the exact problem is, here is a workaround. Keep the excel sheet opened in Microsoft Excel before you run your script.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor
        There is a maximum number of connections that the Microsoft Jet database engine (the engine behind the scenes of the DDT objects) can have open at a time. If you're while loop is opening connections each time through the loop, you're probably maxing out the connections. Make sure that, when you're done with the data in the driver, you call the DDT.CloseDriver(<drivername>) method to close the connection.
  • sanaumar's avatar
    sanaumar
    New Contributor

    Hi, Excel was working absoultely fine with my scripts, but like 2 days ago i got the same Error, when i debug the issue i found that Excel is upgraded to 64 bit from 32 bit.

    All my scripts are working absoultely fine with 32 bit Excel.

     

    This is the Time Test Complete shopuld work on this and should give support for 64 bit Excel!

     

    Best Regards!