Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Invalid Transaction State Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Invalid Transaction State " Watch "Invalid Transaction State " New topic
Author

Invalid Transaction State

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi, I get the following error when connecting to Microsoft Access Database(ODBC)


Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Invalid transaction state


It seems like my database is locked? I dunno... There is a file described as Microsoft Access Recod-Locking information next to my database file. Here's my code...


import java.io.*;
import java.sql.*;



Thanks guys...


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
Try closing the statement after executing the insert. That should release the locks IIRC.


Cheers!<br /><b>Annie</b>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Invalid Transaction State
 
Similar Threads
no dafault driver specified
Difference between execute() and executeQuery()
sql_handle_env failed
JdbcOdbc Connection
URL error (DSN not found)