Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Please HELP..rs.getString or rs.getAttribute??

843835Dec 3 2001 — edited Dec 3 2001
Hi I have a function that gets the value and I store it into a variable. I just want to print this to see that infact I have captured it properly.
1) code for that part --
sql1 = "Select distinct next_gun() as id from dummy ";

rs = stmt.executeQuery(sql1);
...then
out.println(rs.getString("id"));
-----the error I get --
Prepared statement not a cursor-specification

2) Also when I do insert this I know in ASP you would put rs("id")

but in JSP how would I do this?
"INSERT INTO person(ID, SSN) "+
"VALUES (" +
"'" + rs("id") + "', " +
"'" + SSN + "')";

???
Thanks for looking at this!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2001
Added on Dec 3 2001
7 comments
186 views