On 10 Jan 2010, at 4:56am, Vathir wrote:

>I am trying to use SQL Jet within my java application, but I consistently
get
>the following error when I run this section of code.  For some reason I
>cannot open this particular database.  I can open up a separate database
>with in my program, but this one always causes the error.
>
>org.tmatesoft.sqljet.core.
>SqlJetException: Transaction wasn't started: error
>code is MISUSE
>
>public int getUserData(String module, int lesson) throws SqlJetException
>       {
>               ISqlJetTable table = userdb.getTable("lessonsCompleted");
>               try
>               {
>
userdb.beginTransaction(SqlJetTransactionMode.WRITE);
[skip]
>               }
>               finally
>               {
>                       db.commit();
>               }
>               return lesson;
>       }


Dear Vathir, you just have tried to commit on connection which hasn't
started transaction. Please, note to variables which you have used to begin
transaction and commit - they are different. You call
"userdb.beginTransaction(...)" and next you call "db.commit()". The
variables "userdb" and "db" are different and it leads to exception because
connection named "db" hasn't started transaction. Nothing serious, just
mistake.

Sorry for this late response, but you have chose not very right place to ask
about SQLJet. SQLJet has own mail-list and issue-tracker which you could use
for get support. Feel free to create issues at
http://code.google.com/p/sqljet/issues/list or just subscribe to mail-list
on users-subscr...@sqljet.com. There also is group at
http://groups.google.com/group/sqljet . You could choose any from this
resources to contact with us.

Please, visit to SQLJet home page http://sqljet.com/ and look for last
updates (we have just released new version 1.0.2). Or find more information
about support and our contacts.

Good luck!


PS. Sorry for not very well English speaking.


Sergey Scherbina,

TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to