Forum Discussion

nishaa123's avatar
7 years ago

An attempt to work with Closed Driver on Test Execute 12.31

I am getting "An attempt to work with Closed Driver" on Test Execute 12.31 since two days.

When i keep data file open then it execute test cases and  it reads data but after few cases data file get closed and it stopped working .

I am using Excel Driver.

4 Replies

  • Marsha_R's avatar
    Champion Level 3

    Well, yes that would be expected if the driver is closed.  There's no way for it to find the data after that.


    It would help if you would post a screenshot of your code from just before the driver is open to just after it's closed so we might be able to see what is happening.

    • tristaanogre's avatar
      Esteemed Contributor

      This is also an error that happens with a DDT driver if, for some reason, there is a failure in creating the driver.  This can happen if the file is not available, the sheet (if using Excel) is not available, or any number of other things that could cause the failure.


      If you're using the Jet database engine (3rd parameter of Excel driver or any CSV driver), there are only a limited number of connections that can be open at a time.  So, if you are opening a bunch of driver connections and never calling DDT.CloseDriver for those drivers, you may be running out of available connections... and this could cause a failure to open a driver which would result in the error you are receiving.


      As Marsha_R said, a bit more information of what code is generating the error, how you are accessing your data, etc., would be useful

      • nishaa123's avatar

        I am closing driver after opening each time using below code

        Call DDT.CloseDriver(DDT.CurrentDriver.Name)


        Same code was running fine last week . Now also it is running fine on few machines on few machine it creating this issue.

        I read on community if you keep open the excel file which is used then it will be fine and it works for me but I really don't understand why it is happening and it is also not a good idea to open excel sheets if you are using multiple datasheets.

        I also read downloading Microsoft Access database Engine 2010 might resolve problem that doesn't work for me.

        The Excel file is stored on C drive . Does it make difference?