
Key: |
DNET-605
|
Type: |
Bug
|
Status: |
Resolved
|
Resolution: |
Fixed
|
Priority: |
Major
|
Assignee: |
Jiri Cincura
|
Reporter: |
Maxim
|
Votes: |
0
|
Watchers: |
1
|
If you were logged in you would be able to see more operations.
|
|
|
Environment:
|
IDE: Visual studio communiti 2013. Framework: C# .Net 4.0. Platform: Windows Server 2012 x64. Server: Firebird Embedded 2.5.4 x64.
|
Issue Links:
|
Relate
|
|
This issue is related to:
|
|
DNET-619
Possible incorrect usage of WeakReference.Target in method FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated
|
|
|
|
|
|
|
Hi all.
First, sorry by my english, not native laguage.
Have the problem with x64 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.
|
Description
|
Hi all.
First, sorry by my english, not native laguage.
Have the problem with x64 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. |
Show » |
There are no comments yet on this issue.
|
|