23 Feb
2012
23 Feb
'12
3:03 p.m.
Hi George, On 23-02-2012 16:55:31 +0200, George Garbis wrote:
PreparedStatement ps2 = con2.prepareStatement("INSERT INTO table1 (a) VALUES (CAST(? AS INTEGER))"); ps2.setInt(1,1); ps2.addBatch();
Statement s1 = con1.createStatement(); s1.execute("CREATE TABLE table2 ( a INTEGER )"); s1.close();
ps2.executeBatch();
Here is the problem. If you perform a schema update/change, MonetDB releases all prepared handles, because they possibly are no longer correct. You need to re-execute your prepare command. Unfortunately, I see your exception string however is broken, so it carries two SQLSTATEs instead of just one, which would indicate this exact error to you (to easily compare).