I am struggling with the code below. The issue is the execute(query) method which won't work on both JDBC and ODBC Instant client drivers.I am running Oracle 11g on Windows. ExecuteUpdate(),executeQuery() fails too.


public String addUser(){
OracleCon db = new OracleCon(); //works and gives a JDBC Conn
Statement st = db.getScrollableStatement();
try{
if(db.connect()){ //this is true
String query="INSERT INTO mjzeko.Users VALUES('"+manNo+"','"+username+"', '"+password+"', '"+alevel+"','','','"+deptID+"')";
//String query1="insert into employee values(5,'Vic','Mbumwae','Mountain View CA','M','Single',SYSDATE,1,'Dir Finance',SYSDATE)";
//System.out.print("here res");
//st.setEscapeProcessing(false);
st.executeUpdate(query);
//System.out.print(res);
db.disconnect();
return "You created a User";
}
else{
return "No conn to DB Failure See DBA >>>";
}

}
catch(SQLException e){
e.printStackTrace();
return "exception occured";
}

}

Thanks ,sorry I couldn't see a code insertion tool!