From: Pavol S. <st...@ra...> - 2002-11-17 21:57:55
|
Hi, i have little problem with: Unhandled Exception: FirebirdSql.Data.Firebird.FbException: arithmetic = exception, numeric overflow, or string truncation i use win1252 coding and slovak collation... i have set in connection string=20 Pooling=3Dtrue;Charset=3DWIN1252 i think, that i have to set something like culture for my app, but = nothing i tried worked... pooling is not working too... because connection open takes more then 1 = sec... using alpha 3... I think, that autor is not english native, so it is probable, that = pronlem is on my side, but i dont know where... thanx=20 pavol |
From: Pavol S. <pa...@st...> - 2002-11-17 22:00:45
|
Hi, i have little problem with: Unhandled Exception: FirebirdSql.Data.Firebird.FbException: arithmetic exception, numeric overflow, or string truncation i use win1252 coding and slovak collation... i have set in connection string Pooling=true;Charset=WIN1252 i think, that i have to set something like culture for my app, but nothing i tried worked... pooling is not working too... because connection open takes more then 1 sec... using alpha 3... I think, that autor is not english native, so it is probable, that pronlem is on my side, but i dont know where... thanx pavol |
From: Pavol S. <pa...@st...> - 2003-03-20 23:00:41
|
Hi, i found there bug (may be)... when closing FbConnection.Close() and i did not close and dispose FbDataReader, exception was raised... null reference... private void GetDBAnswer() { string dbCommandString = "select first 1 POLLID, TEXT, FINALVOTES from PollsAnswers where ID = @ID"; FbConnection dbConn = new FbConnection(dbConnectionString); try { dbConn.Open(); FbTransaction dbTran = dbConn.BeginTransaction(); try { FbCommand dbComm = new FbCommand(dbCommandString, dbConn, dbTran); try { dbComm.Parameters.Clear(); dbComm.Parameters.Add("@ID", id); FbDataReader dbData = dbComm.ExecuteReader(); try { if (dbData.Read()) { pollId = dbData.GetInt32(0); text = dbData.GetString(1); finalVotes = dbData.GetInt32(2); } } finally { //MARK dbData.Close(); //MARK dbData.Dispose(); } } finally { dbComm.Dispose(); } } finally { dbTran.Commit(); dbTran.Dispose(); } } finally { dbConn.Close(); } } ir two marked lines was not there exception was raised, and when i added that lines everything is ok... thanx p. |
From: Carlos G.A. <car...@te...> - 2003-03-21 11:59:04
|
Hello: > i found there bug (may be)... when closing FbConnection.Close() and i > did not close and dispose FbDataReader, exception was raised... null > reference... Fixed in CVS, thanks very much. Best regards Carlos Guzman Alvarez Vigo-Spain |
From:
<car...@te...> - 2002-11-17 22:08:25
|
Hello: > i have little problem with: > Unhandled Exception: FirebirdSql.Data.Firebird.FbException: arithmetic > exception, numeric overflow, or string truncation > > i use win1252 coding and slovak collation... > i have set in connection string > Pooling=true;Charset=WIN1252 Making what?? What is the charset of the database?? > pooling is not working too... because connection open takes more then 1 > sec... A sample on how connection pooling work (at this moment connection pooling can have problems :) ): FbConnection myConnection1 = new FbConnection(GetConnectionString()); FbConnection myConnection2 = new FbConnection(GetConnectionString()); FbConnection myConnection3 = new FbConnection(GetConnectionString()); // Open two connections. Console.WriteLine ("Open two connections."); myConnection1.Open(); myConnection2.Open(); // Now there are two connections in the pool that matches the connection string. // Return the both connections to the pool. Console.WriteLine ("Return both of the connections to the pool."); myConnection1.Close(); myConnection2.Close(); // Get a connection out of the pool. Console.WriteLine ("Open a connection from the pool."); myConnection1.Open(); // Get a second connection out of the pool. Console.WriteLine ("Open a second connection from the pool."); myConnection2.Open(); // Open a third connection. Console.WriteLine ("Open a third connection."); myConnection3.Open(); // Return the all connections to the pool. Console.WriteLine ("Return all three connections to the pool."); myConnection1.Close(); myConnection2.Close(); myConnection3.Close(); > > using alpha 3... > > I think, that autor is not english native, so it is probable, that > pronlem is on my side, but i dont know where... I´m spanish. Best regards Carlos Guzmán Álvarez Vigo-Spain |