views:

57

answers:

1

I'm using a prepared statment that should (using SQL & JDBC) insert data into a dataTable. I am using one that deletes data that works fine, but the insert one is not inserting any data into the data table and does not produce an error or warning. What could cause a prepared statement to fail in this way? Could inserting a null value into the prepared statement cause this?

+2  A: 

What do you mean by "failing, but does not produce an error"? How do you know it's failing then - is data not actually being inserted? Perhaps you're not committing a transaction?

ChssPly76
edited question to eliminate confusion. Yes data is not actually being inserted.
Soldier.moth
Well, did you check whether transaction is being committed? Can you post your code here?
ChssPly76
yeah I forgot to call 'insert.executeUpdate();' Still not working but at least I have an error now, Thanks.
Soldier.moth