Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
119 views
in Technique[技术] by (71.8m points)

java - SQL7008 Error - Workaround?

I'm using the JTOpen JDBC driver for a DB2 Universal database. I have very little experience with SQL beyond simple statements.

From this question, I see that the error I'm getting (SQL7008) is thrown when trying to "insert/update rows in a non-journaled table during a transaction" (paraphrased).

According to the project lead, our DB is not journaled and won't be any time soon (don't ask me why, I'm not the DBA). However, I'm working on a project where being able to commit everything in one go (rather than AutoCommit-ing each time an execute is called) is nearly necessary (not totally required, but it would solve a lot of issues down the road).

Is there any way to work around erorr SQL7008 without enabling Journalling?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The only way to work around it without enabling journaling is to disable transaction isolation in your connection string as follows:

jdbc:as400://systemname;naming=sql;errors=full;transaction isolation=none;date format=iso

The full list of JDBC properties can be found in the IBM Toolbox for Java JDBC properties documentation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...