Hello:

> This question is about the handling of parameter overflow in the 
> Firebird.NET Provider.  If you do something along these lines:
>  
>       c:=FbCommand.Create('select * from zip where zip_code=?', 
> FbConnection1);
>       c.Parameters.Add('', FbDbType.VarChar).Value:='123456';   <<-- 
> note 6 chars
>       c.ExecuteReader
>  
> and zip_code is defined to be varchar(5), you'll receive an 
> isc_arith_except error.  In the Delphi TDataSet world, if you write a 
> parameterized query like this, and then supply a value that is too long, 
> it will in general be shortened to fit and no error returned or 
> exception raised.

The provider checks for char and varchar parameters that the value has a 
correct lenght according to the parameter definition, if it hasn't it 
will raise an exception.

> Is there a way to make the Firebird.NET Provider tolerant of parameter 
> overflow like this and to truncate automatically?  


No, and this is something that it's not going to be changed.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to