Answer Posted / khushnood alam
two catch block can be executed but need coresponding try
block
ex
DbTransaction Transaction = Connection.BeginTransaction();
try
{
RemoteDB.ExecuteNonQuery(cmdBfcNew,
Transaction);
if (Convert.ToInt64
(AddBfcNewOutgoingDetails["ID"]) == -1)
{
mID = Convert.ToInt64
(RemoteDB.GetParameterValue(cmdBfcNew, "@ReturnID"));
}
else
{
mID = Convert.ToInt64
(AddBfcNewOutgoingDetails["ID"]);
}
try
{
DbCommand cmdOutgoing =
LocalDB.GetStoredProcCommand
("usp_Outgoing2UpdateAfterUploadingData");
LocalDB.AddInParameter
(cmdOutgoing, "@AwbNo", DbType.String,
AddBfcNewOutgoingDetails["AwbNo"]);
}
catch (Exception Ex)
{
Transaction.Rollback();
Transaction1.Rollback();
return Ex.Message;
}
catch (Exception Ex)
{
Transaction.Rollback
();
return Ex.Message;
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What exactly happens when we debug and build the program?
How do I simulate optional parameters to com calls?
What is predicate builder?
Why do you need boxing in c#?
What is the process of Serialization?
Explain manifest & metadata in c#.
How do I create a multi language, multi file assembly?
how to insert the data from the grid view to database table though button click.pls send the answer to mail id suri1319@gmail.com
What is connection pooling in ado.net?
Is unity object oriented?
What are the types of parameters in c#?
Can I get the name of a type at runtime?
Is lazy thread safe c#?
How to transpose multi-dimensional array?
Where test director stores its data ? Database ,Local file etc...? I need to read this data from Visual Studio 2005 c# client. Regards