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

Marcos Sánchez Provencio msanchez at grupoburke.com
Mon Apr 26 15:46:24 EDT 2004


Try closing the cursor. If that does not work, try closing the 
connection. 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).
>
> Bob Gailer
> bgailer at alum.rpi.edu
> 303 442 2625 home
> 720 938 2625 cell
>
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig





More information about the DB-SIG mailing list