Hi,
Please let me know if the bellow code is correct.
I mean connection is closed and disposed and transaction is rolled
back and closed and disposed in case of exception.
Any other suggestions are welcome.
Thank you,
Adrya
using (FbConnection c = new FbConnection(m_connection))
{
c.Open();
using (FbTransaction trans = c.BeginTransaction())
{
using (FbCommand cmd = new
FbCommand("DELETE_MESSAGES_QUEUE", c, trans))
{
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add("INQUEUENAME", queueName);
cmd.ExecuteNonQuery();
}
using (FbCommand cmd = new FbCommand("DELETE_QUEUE", c, trans))
{
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add("INQUEUENAME", queueName);
cmd.ExecuteNonQuery();
}
trans.Commit();
}
}
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider