• Post Reply Bookmark Topic Watch Topic
  • New Topic

prepare Statement : Errors

 
Sunil Ahuja
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am trying to login to a db using the preparedStatement but am getting the following error.
login.java [62:1] No method found matching prepareStatement(String)
PreparedStatement ps = myConn.prepareStatement(loginSQL);
^
login.java [62:1] Cannot parse initializer
PreparedStatement ps = myConn.prepareStatement(loginSQL);
^
this is what i have
myConn.makeConnection();
PreparedStatement ps = myConn.prepareStatement(loginSQL);
rs = ps.executeQuery();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!