MichaelPaolino / CukLabScripts

Data processing scripts and transient spectroscopy library used in the Cuk lab
0 stars 2 forks source link

Committing to an empty table returns an error #6

Open IlyaVino opened 2 years ago

IlyaVino commented 2 years ago

The bug occurs because the db fetch returns 1 less record than was committed when executing "SELECT TOP # FROM TableName", i.e. there are 25 new records, but "SELECT TOP 25 FROM TableName" returns 24 records.

This seems to be a MS Access bug, but in general it would be better to move away from SELECT TOP since it is not compatible with all DBMS.

Currently, the ODBC driver cannot turn off autocommit in MS Access so the entries get committed anyway... meaning ignore the error for now.

IlyaVino commented 2 years ago

Worth nothing this is with the dbCommitSave() method