Application Exception happens instead of FbException when Firebird service is 
stopped.
--------------------------------------------------------------------------------------

                 Key: DNET-324
                 URL: http://tracker.firebirdsql.org/browse/DNET-324
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 2.5.2
         Environment: Windows 7 Ultimate;
Microsoft Visual C# 2010 Express;
Firebird 2.5.0.25920 Release candidate 2;

            Reporter: Luciano Mendes
            Assignee: Jiri Cincura


ACTUAL RESULT: Application Exception happens instead of FbException when 
Firebird service is stopped.

EXPECTED RESULT: An FbException should happen instead of Application Exception.

STEPS TO REPRODUCE THIS ISSUE:
1- Start Firebird service and connect with a database [fbConnection].
2- Execute a valid data reader [fbCommand.ExecuteReader()] or Non Query 
[fbCommand.ExecuteNonQuery()]:
   Verify that no error happens;
3- Stop Firebird Service and repeat the same procedure from step 2
   ISSUE: An application exception happens instead of an FbException:

***************************************************************************************************************
System.NullReferenceException: Object reference not set to an instance of an 
object.
   at 
FirebirdSql.Data.Client.Managed.Version10.GdsTransaction.BeginTransaction(TransactionParameterBuffer
 tpb)
   at 
FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.BeginTransaction(TransactionParameterBuffer
 tpb)
   at FirebirdSql.Data.FirebirdClient.FbTransaction.BeginTransaction()
   at FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet)
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior 
behavior, Boolean returnsSet)
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior 
behavior)
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
***************************************************************************************************************
Example:
================================================================
try
{
    FbCommand fbCommand = new FbCommand(cmdText, fbConnection);
    fbCommand.CommandType = CommandType.Text;
    FbDataReader fbDataReader = fbCommand.ExecuteReader();
    return fbDataReader;
}
catch (FbException ex)
{
    /*THIS EXCEPTION SHOULD GET HERE*/
    if (ex.Errors[ex.Errors.Count - 1].Number == 335544726)
      MessageBox.Show("Connection to Server Lost.", "ERROR");
}
================================================================
ENVIRONMENT
- ADO.NET Data Provider Version: 05-Jun-2010 19:07 - 
http://netprovider.cincura.net/FirebirdSql.Data.FirebirdClient.dll;
- Windows 7 Ultimate;
- Microsoft Visual C# 2010 Express;
- Firebird 2.5.0.25920 Release candidate 2;
================================================================

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to