
While executing following code an Error was generated.can any one help me for this.
LiveDB liveDBObj = DataSourceFactory.getLiveDBInstance();
PreparedStatement pstmt=null;
String qry="";
qry="insert into inst(id,name) values (?,?)";
pstmt = liveDBObj.getPreparedStatement(qry);
pstmt.setDouble(1,2.0);
pstmt.setString(2,"name1");
int i=pstmt.executeUpdate(qry);
----------
**ERROR:java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,?)' at line 1**

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.