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
Post a Comment