1.INSERT
When you call PL/SQL to insert, you do not use super (), you should create your own callable statement at this time;
Call the Checkerrors () method after performing an callable statement handling exception
protected void InsertRow ()
{
Try
{
String insertstmt = "BEGIN Insert_record (" +
"PARAM1" +: 1, "+
"PARAM2" +: 2, "+
"PARAM3" +: 3, "+
"PARAM4": 4); END; ";
Dbtransaction Trxn = Getdbtransaction (); CallableStatement insertstmt = Trxn.createcallablestatement (insertstmt, 1); Rebind Parameters insertstmt.setstring (1, Getfirstname ()); Insertstmt.setstring (2, Getlastname ()); Insertstmt.setstring (3, GetAddress1 ());
Execute the statement
//oaexceptionutils.checkerrors as per plsql API standards } catch ( SQLException SqlE) { ... } }
If you had any calculations for any of your EO columns in your PL/SQL procedure, and if you would like to reflect those V Alues in your EO after row insertion in the database, then you should include those columns in your view object SQL and do The following:
Txn.commit ();
Vo.executequery ();
Clear the EO cache
Clearentitycache ();
PL/SQL EO design and development