aspose file tools*
The moose likes JDBC and the fly likes AS400 and JDBC (and SQL) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "AS400 and JDBC (and SQL)" Watch "AS400 and JDBC (and SQL)" New topic
Author

AS400 and JDBC (and SQL)

Robin Richardson
Ranch Hand

Joined: Mar 01, 2001
Posts: 37
I am having a problem locating a file in AS400 using SQL if I try to use commit() and rollback(). Are these not accepted in AS400, and if not is there a better way to do this?
Thanks
Robin
Nick Heudecker
Ranch Hand

Joined: Jul 09, 2000
Posts: 52
commit() and rollback() are accepted on DB2/400. It may be a permissions issue. That's usually what holds me up on the 400.


---<br />Co-author of "Hibernate Quickly"<br /><a href="http://www.manning.com/books/peak" target="_blank" rel="nofollow">http://www.manning.com/books/peak</a>
Robin Richardson
Ranch Hand

Joined: Mar 01, 2001
Posts: 37
It isn't so much that it won't commit and rollback, but when I add these commands then the program gives me an SQL error stating that a token is wrong, or a statement in not correct. Forgot to write down the SQL error number.
If anyone knows where I can vind a listing of SQL error codes (mostly for Oracle, and DB/2 would be helpful) I would greatly appreciate it.
Thanks
Robin Richardson
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 671
If you handle commit() by yourself, the file on AS400 must be journalled. Otherwise you get SQL7008 error.
Bruce


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 671
BTW, to view SQL error description on AS400, use command
DSPMSGD. the message file is QSQLMSG.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AS400 and JDBC (and SQL)