java - Calling SQL Server stored procedure using JDBC/ODBC -


i want update table using store procedure.

try {     class.forname("sun.jdbc.odbc.jdbcodbcdriver");     connection con = drivermanager.getconnection("jdbc:odbc:karthi","sa","");     string query=("{call supdate set=(?,?,?,?,?,?,?,?) where="+value1+"}");     callablestatement statement = con.preparecall(query);      statement.setstring(1, value2);     statement.setstring(2, value3);     statement.setstring(3, value4);     statement.setstring(4, value5);     statement.setstring(5, value7);     statement.setstring(6, value8);     statement.setstring(7, value9);     statement.setstring(8, value10);      statement.execute();  }catch(exception e ) {     system.out.println(e.getmessage()); } 

i get

[microsoft][odbc sql server driver]syntax error or access violation 


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -