freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] String or binary data would be truncated
- From: "Robert Dobbs" <bobisdobbs AT hotmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] String or binary data would be truncated
- Date: Wed, 20 Sep 2006 10:53:34 -0700
> >From a Linux box, I am able to do the $hDatabase->do("UPDATE .....
>but the $hStatement->execute() gives me error
>DBD::ODBC::st execute failed: [unixODBC][FreeTDS][SQL Server] String or
>binary data would be truncated. (SQL-22001)
>
>and the script quits.
It means the input exceeds the maximum length of the field definition, i.e. the field is VARCHAR(50) but your input is 52 characters.
Thanks for the quick response Mark. However, the same script has been working from a windows box, except that the DBD::ODBC module used is of Windows version.
Sure, but that is still the problem. DBD::ODBC does not care and probably lets your database truncate the value, without interfering with its behavior. DBD::Sybase breaks. I found that using FreeTDS with DBD::ODBC works more like how I expected DBI to work.
Mark
_________________________________________________________________
Express yourself - download free Windows Live Messenger themes! http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-us&source=hmtagline
-
[freetds] String or binary data would be truncated,
Nguyen, Thi X., 09/19/2006
-
Re: [freetds] String or binary data would be truncated,
Robert Dobbs, 09/19/2006
-
Re: [freetds] String or binary data would be truncated,
Nguyen, Thi X., 09/19/2006
- Re: [freetds] String or binary data would be truncated, Robert Dobbs, 09/20/2006
-
Re: [freetds] String or binary data would be truncated,
Nguyen, Thi X., 09/19/2006
-
Re: [freetds] String or binary data would be truncated,
Robert Dobbs, 09/19/2006
Archive powered by MHonArc 2.6.24.