[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
returning a
Hello to all. If I issue a script to Oracle how can I get this to work?
I need to set the "set serveroutput on" before running the statement. Which
I've commented out here...
//sql.append(" set serveroutput on; \n");
sql.append(" declare v_NewPKey NUMBER;\n");
sql.append(" BEGIN\n");
sql.append(" INSERT INTO LOCATION(LOCT_NAME) VALUES ('test loc') RETURNING
LOCT_ID INTO v_NewPKey;\n");
sql.append(" commit;\n");
sql.append(" dbms_output.put_line(v_NewPKey);\n");
sql.append(" end;\n");
The issue is we have a trigger inserting the nextval from a sequence and we
need to marshall back the v_NewPKey as a result set. Anyway to get this
done in one call?
thanks,
David
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail