Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException in FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated() [DNET605] #567

Closed
firebird-automations opened this issue Apr 29, 2015 · 2 comments

Comments

@firebird-automations
Copy link

Submitted by: Maxim (aquamakc)

Is related to DNET619

Hi all.
First, sorry by my english, not native laguage.
Have the problem with x64 http://ADO.NET Provider.
In operations of adding, changing and deleting data in tables the program throwing exception NullReferenceException.

Exception stack:
at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated()
at FirebirdSql.Data.FirebirdClient.FbTransaction.UpdateTransaction()
at FirebirdSql.Data.FirebirdClient.FbTransaction.Commit()
at FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction()
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
at *myMethod*

For example adding method:
if (dbConnect.State != ConnectionState.Open)
dbConnect.Open();
FbCommand findClientCom = new FbCommand("Select ID FROM CLIENTS WHERE ID='" + ID.ToString() + "'", dbConnect);
FbDataAdapter FDA = new FbDataAdapter(findClientCom);
DataSet ds = new DataSet();
int count = FDA.Fill(ds);
if (count > 0)
{
errStr = "This Client is present";
return false;
}
String insertText = @"INSERT INTO CLIENTS (ID, NET_ID, NAME, LOGIN, PASSWORD, RES_PU, RES_KP, CLUSTER)";
insertText += @" VALUES(@id, @NET_ID, @name, @LOGIN, @password, @RES_PU, @RES_KP, @cluster)";
FbCommand insertCom = new FbCommand(insertText, dbConnect);
insertCom.Parameters.AddWithValue("@id", ID.ToString());
insertCom.Parameters.AddWithValue("@NET_ID", net_id.ToString());
insertCom.Parameters.AddWithValue("@name", name);
insertCom.Parameters.AddWithValue("@LOGIN", login);
insertCom.Parameters.AddWithValue("@password", password);
insertCom.Parameters.AddWithValue("@RES_PU", res_pu);
insertCom.Parameters.AddWithValue("@RES_KP", res_kp);
insertCom.Parameters.AddWithValue("@cluster", cluster.ToString());
insertCom.ExecuteNonQuery();
errStr = "Client " + VikingServer.ushortToStr(ID) + " was added";
return true;
}
catch (Exception ex)
{
errStr = ex.ToString();
return false;
}

My methods are working stable on 32 platform. On x64 tables are changing, but after change i have this exception.

Please help me with this problem.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue is related to DNET619 [ DNET619 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: vNext [ 10704 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants