Hi
I'm currently using PB 12.6 4011 and sharing out the ADO.NET SQLCA connection to a C# COM assembly using SQLCA.GetAdoConnection()
I've structured the proxy as per the PB help and everything fine until I try to put COMMITS into the C# program. I've currently added
DBtran.Commit();
DBProxy.Transaction = DBconn.BeginTransaction();
after the transaction processing that needs to be committed. This works ok, however PB does not seem to know about the new transaction and fails on the next COMMIT using SQLCA.
Database Error Message: System.NullReferenceException: Object reference not set to an instance of an object.
at Sybase.PowerBuilder.Db.Block.SqlBlock.ProcessError(Exception ee)
at Sybase.PowerBuilder.Db.Data.DbBlock.DoTransaction(PbTrans oper)
at Sybase.PowerBuilder.Db.DbRoutine.DoTransaction(PbTrans oper)
I've set breaks in the C# code and found that the transactionchanged on the shared proxy is being fired when I issue a COMMIT from PB.
I suspect I'm missing code in the shared proxy event
void proxy_TransactionChanged(object sender, EventArgs e) {
DBtran = sender as IDbTransaction;
DBconn = DBtran.Connection;
}
Anyone idea on where I'm going wrong here?
thanks in advance
Allan