In my code i m not using the loop.i just tried to insert only one record. while i was doing so, i got no errors. and the record was not inserted. but when i tried with the 2 records using separate 'insert' command it was working.
posted 14 years ago
When i inserted 2 records, i could not insert the last one(second one). when i inserted 3 records, i could not insert the last one( third one).
Translation: u = you ur = you are, you're 4 = for y = why i m = I'm Please don't be lazy. Contractions make posts harder to read. Are large proportion of JavaRanch users don't have English as their first language, so combining contractions with spelling and grammar errors just serves to make communication harder when we should be trying to make it easier. Thanks.
Please give us more information. If you are using MS Access and the JDBC-ODBC bridge, this is a common problem, you'll find several hundred threads discussing it in this forum. The simple solution is either set autoCommit to true or do a 'dummy read' to flush the connection.
posted 14 years ago
Sorry for the inconvenience, near after i will follow your request.
yes, i am using JDBC-ODBC driver with MS-ACCESS.
Is the problem in the MS-ACCESS or in JDBC-ODBC? where i have to use the 'autocommit'? Is it in MS-ACCESS or in my coding?
I believe the issue is caused by the JDBC-ODBC driver. It was only designed as a quick fix to bridge the gap between the two technologies and has outgrown its purpose. It was never meant for production systems and has greater issues than this one!
It appears the driver caches queries and needs 'one more request' to make sure the previous one gets flushed, hence the 'dummy select' at the end. Presonally I always set the auto commit, but then I try not to use Access anyway.
I hope your problem is fixed. Dave
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database