Excel ODBC driver created table/data not persistent

  • Thread starter Thread starter Farid Z
  • Start date Start date
F

Farid Z

I connect to an Excel spreadsheet using Microsoft Excel Driver (*.xls)
4.00.6305.00 successfully and I am able to create a new table and insert data
into the the new table and retrieve the inserted new data successfully.

On closing the application however, the new table and its data are gone and
the spreadsheet is never updated. Seems like everything is done in memory.

I am using autocommit mode and issuing an ODBC SQLEndTran/SQL_COMMIT after
both creating the table and inserting the data, as usaul and that works fine
with all other ODBC data sources but not the Excel ODBC data source.

What am I missing?
 
Correction: I am actually not calling SQLEndTran because the driver reports
it does not support transactions
 
OK. I found out the cause of this issue was a code path that skipped calling
::SQLDisconnect before freeing connection handle. Now it all works
 
Back
Top