Hi!

I've got a problem with the new version, and I don't know what it is. 
Maybe it's not a problem with the version.
I've created a command:

String sqlStreams = "INSERT INTO STATIONDETAILS_STREAMS 
(STATIONDETAILSID, URL, FORMAT, BITRATE, PLAYLIST) VALUES (@param1, 
@param2, @param3, @param4, @param5);";
...
FbCommand cmdSts = new FbCommand(sqlStreams, conn, trans);
cmdSts.Parameters.Add("param1", FbDbType.Integer);
cmdSts.Parameters.Add("param2", FbDbType.VarChar);
cmdSts.Parameters.Add("param3", FbDbType.VarChar);
cmdSts.Parameters.Add("param4", FbDbType.Integer);
cmdSts.Parameters.Add("param5", FbDbType.VarChar);
...
For(..) {
  ...
  cmdSts.Parameters["param1"].Value = station.Id;
  cmdSts.Parameters["param2"].Value = stream.Url;
  cmdSts.Parameters["param3"].Value = stream.Format;
  cmdSts.Parameters["param4"].Value = stream.Bitrate;
  cmdSts.Parameters["param5"].Value = Convert.ToString(stream.Playlist);
  cmdSts.ExecuteNonQuery();
  ...
}

Well, if I run this code, first time it runs without problems, but 
always in the next time it breaks with the following exception:

Eine Ausnahme (erste Chance) des Typs 
"FirebirdSql.Data.Common.IscException" ist in 
FirebirdSql.Data.FirebirdClient.dll aufgetreten.
Eine Ausnahme (erste Chance) des Typs 
"FirebirdSql.Data.FirebirdClient.FbException" ist in 
FirebirdSql.Data.FirebirdClient.dll aufgetreten.
-> arithmetic exception, numeric overflow, or string truncation
string right truncation
->    bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery() in 
C:\Users\Jiri\Desktop\NETProvider\source\FirebirdSql\Data\FirebirdClient
\FbCommand.cs:Zeile 513.
   bei 
BuryWebSuite.Database.FirebirdEmbedded.StoreStationDetailsListToDatabase
(List`1 stations) in 
C:\Projekte\M0760_01\3040_Software-Engineering\304040_SW-Construction\30
4040_Source-Code\BURY Web Suite\BURY Web 
Suite\Database\FirebirdEmbedded.cs:Zeile 728.

I use VS2010 and .NET 4 (in German, as you maybe see). I know that 
Convert.ToString(stream.Playlist) is always true or false. The field in 
the database is varchar(10), so that it usually can't be a string 
truncation...

Can you help? And why the hell I get your path on my computer in the 
exception??

Regards
Martin


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to