|
I am connecting to an AS/400 using DriverManager.registerDriver(new com.ibm.as400.access.AS400JDBCDriver()); con = DriverManager.getConnection("jdbc:as400://xxx.xxx.xxx.xxx"); <my IP here> This prompts me for a user id & password and connects. Then I build a listbox with the contents of a file and this works great. When I try to add a record, I get the SQL error. My statement is addSql = con.prepareStatement("INSERT INTO TEFF.URLGROUP (R1KEY, R1DESC) VALUES(?, ?)"); In my add logic I do try { addSql.setInt(1, nextKey); addSql.setString(2, edtField.getText()); addSql.executeUpdate(); } These are the only two fields in the file. I use an SQL statement prior to the add that gets MAX(R1KEY) and I add 1 to that. I've printed this value to the console and it is correct. I checked security and everything looks fine. I can't find any documentation on this SQL error except that the SQL State is 55019. Can anyone help me here or at least point me in the right direction. Thanks. Joe Teff +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.