java - Prepared statement doesnt work with set role -
i working oracle roles , java , trying set role via prepared statement giving me exception missing or invalid role name here function
public static void setrole(string rn,string rp,connection cn){ try{ preparedstatement pstmt = cn.preparestatement("set role ? identified ?"); pstmt.setstring(1, rn); pstmt.setstring(2, rp); pstmt.executeupdate(); pstmt.close(); }catch(exception oops){ oops.printstacktrace();; } } any appreciated :d
try pstmnt.execute() rather executeupdate()
some notes appear here
presumeably change in role associated connection object have executed statement against.
Comments
Post a Comment