[DB-SIG] How to close FoxPro tables opened with ODBC

Marcos Sánchez Provencio msanchez at grupoburke.com
Tue Apr 27 05:48:29 EDT 2004


Does it happen when you use odbc with vb (you can use vbs if you don't 
have vb)?

Bob Gailer wrote:

> At 01:46 PM 4/26/2004, Marcos Sánchez Provencio wrote:
>
>> Try closing the cursor. If that does not work, try closing the 
>> connection.
>
>
> Been there. Done that. Tables still locked.
>
>> It is still better than closing Python absolutely.
>>
>> Bob Gailer wrote:
>>
>>> At 06:37 AM 4/26/2004, M.-A. Lemburg wrote:
>>>
>>>> Bob Gailer wrote:
>>>>
>>>>> I define an ODBC data source using the Microsoft FoxPro DFP Driver.
>>>>> I create a connection using this data source, with the odbc module
>>>>> I create a cursor, and use it to execute a query.
>>>>> The tables referenced by the query are now "tied up", in that I can't
>>>>> erase them (Access denied).
>>>>> The only way I've found to close them is to close the Python session.
>>>>> Is there a way to close these tables without quitting Python?
>>>>
>>>>
>>>>
>>>> A possible cause is that a still open transaction blocks
>>>> the tables from being dropped.
>>>
>>>
>>>
>>> I'm not using any transactions. (I did try connection.commit() 
>>> anyway, with no effect).
>>




More information about the DB-SIG mailing list