aspose file tools
The moose likes JDBC and the fly likes not able to insert values Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "not able to insert values" Watch "not able to insert values" New topic
Author

not able to insert values

anwesh maity
Greenhorn

Joined: Oct 31, 2007
Posts: 18
i am not able to insert values in the database is the query correct ???

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3652

Use PreparedStatements!!!

If you have a single quote in any of those strings (John O'Conner) its going to die. Your query with PreparedStatements should then just be "INSERT INTO kdnet.users VALUES (?,?,?,?,?)".


My Blog: Down Home Country Coding with Scott Selikoff
minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
please list out the exact error you are getting after execution of this code.


Minal Silimkar
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: not able to insert values
 
Similar Threads
Auto Increment
storing date in database
oracle date between
insert query working in toad and giving error in jdbc
IllegalStateException when inserting session attribute into a table