ado.net begin informix transaction



Hi,

Is there any one used the following way to open a INFORMIX transaction
in ADO.NET?

OleDbConnection conn = new OleDbConnection(connString);
OleDbCommand cmd = new OleDbCommand("Begin Work", conn);
cmd.ExecuteNonQuery();
//....Do the other works .....//
cmd = new OleDbCommand("Commit Work", conn);

Or

OleDbConnection conn = new OleDbConnection(connString);
OleDbTransaction trans = conn.BeginTransaction();
OleDbCommand cmd = new OleDbCommand("Update XXX", conn); //Please
notice that the transaction object is not passed in..
cmd.ExecuteNonQuery();
trans.Commit();

This is not followed the way how ADO.NET handles the transaction. But
it works. Does anyone know if the above code will have any problem?

Thanks.

.



Relevant Pages

  • ado.net begin informix transaction
    ... Is there any one used the following way to open a INFORMIX transaction ... OleDbConnection conn = new OleDbConnection; ... Prev by Date: ...
    (microsoft.public.data.ado)
  • ado.net begin informix transaction
    ... Is there any one used the following way to open a INFORMIX transaction ... OleDbConnection conn = new OleDbConnection; ... Prev by Date: ...
    (comp.databases.informix)
  • Re: Find personnelIDs previous record based on date
    ... (SELECT Max(q.[Date of transaction]) ... Table: Prev ... and you only want to see previous "promotion" ... I need to show where the agent was promoted from, (department, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Need help with accounting database
    ... TransID -- Auto Increment ... MonthEnd -- The month end of the transaction occured. ... TransactionType - Pmt, Service Charges, Interest, etc. ... Notice I have ditched the prev and currentBalDue fields in any table. ...
    (comp.databases.ms-access)
  • Re: UpdateBatch - taking a while
    ... the ado recordset to see how many "changed" records are there and force an ... If done inside a transaction, ... the opportunity to rollback the whole set .. ... Prev by Date: ...
    (borland.public.delphi.database.ado)