i using jdbc connectivity on ms access database , here code
import java.sql.connection; import java.sql.drivermanager; import java.sql.preparedstatement; import java.sql.resultset; import java.sql.sqlexception; public class excelconnectivity { public static void main(string[] args) { try { class.forname("sun.jdbc.odbc.jdbcodbcdriver"); connection con=drivermanager.getconnection("jdbc:odbc:db"); string query="update validation set validation.rackid=rack.rackid rack.bookid=validation.bookid"; preparedstatement ps=con.preparestatement(query); ps.executeupdate(); system.out.println("doneeeeeeeeeeeeeeeeeeeeee"); } catch(sqlexception | classnotfoundexception e) { e.printstacktrace(); } } }
now database follow
now error occurring [microsoft][odbc microsoft access driver] few parameters. expected 2.
i have checked table name in database , jdbc code, checked connection
any me in error
the query have used incorrect, has nothing connectivity or connection. error trying convey using parameters in query not supplying values @ execution.
update validation set validation.rackid=rack.rackid rack.bookid=validation.bookid
where pick rack values ?
Comments
Post a Comment