I apologize if this topic has been covered before, but I'm under the gun with a task and need some help pretty quickly.
I'm new to SQLJ and DB2, but I've written a "Java Stored Procedure" using IBM's development client which builds and loads into DB2 without error. I have multiple calls to #sql but only the first call succeeds. Is there something I'm doing / not doing? I've tried using one context, different contexts, etc. Here is some of the code:
public static void grm_InsStgComAll ( String subid ) throws SQLException, Exception
{
SPContext ctx = null;
SPContext ctx2 = null;
try
{
ctx = new SPContext( "jdbc:default:connection", false );
ctx2 = new SPContext( "jdbc:default:connection", false );
#sql [ctx]
{ my insert to table 1 here };
#sql [ctx2]
{ my insert to table 2 here };
.....
}
When this proc executes, table 1 is populated, but table 2 is not. Any suggestions? Remember, I'm a SQLJ newb so please go easy.
