ado.net begin informix transaction
- From: "kliu" <kevinkliu@xxxxxxxxx>
- Date: 10 Nov 2005 15:23:32 -0800
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.
.
- Prev by Date: Re: Sql to concatenate multiple rows to a single row / column
- Next by Date: Re: Error 1829 from a Webservice
- Previous by thread: Sql to concatenate multiple rows to a single row / column
- Next by thread: RE: ado.net begin informix transaction
- Index(es):
Relevant Pages
|
|