freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Data-conversion resulted in overflow on image column
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Data-conversion resulted in overflow on image column
- Date: Wed, 5 Apr 2006 21:48:29 -0400
John Gilmore-Baldwin wrote:
> 23:47:24.450271 _ct_bind_data(): column_type: 34 column_len: 64512
> 23:47:24.450297 _ct_get_server_type(16)
> 23:47:24.450323 _ct_get_client_type(type 34, user 0, size 64512)
> 23:47:24.450350 cs_convert()
> 23:47:24.450375 _ct_get_server_type(11)
> 23:47:24.450399 _ct_get_server_type(16)
> 23:47:24.450424 cs_convert() srctype = 34 (64512) desttype = 35 (64512)
> 23:47:24.450451 cs_convert() calling tds_convert
> 23:47:24.452384 cs_convert() tds_convert returned 129024
> 23:47:24.453389 cs_convert() returning 0
> 23:47:24.453472 cs_convert-result = 1
> 23:47:24.453501
> convert failed for 11
What? You mean "convert failed for 11" isn't stupifyingly obvious?
Allow me to explicate, my dear fellow.
As is well known, "convert failed for 11" comes from _ct_bind_data(). The
newline at the beginning of the message is a highly decorative flourish,
very rarely used because it can be overdone, but much appreciated by the
cognoscenti when used with taste. Ever so much more subtle than, say,
issuing a client-side error message that your handler could display.
The real trouble is here:
> 23:47:24.450424 cs_convert() srctype = 34 (64512) desttype = 35 (64512)
> 23:47:24.450451 cs_convert() calling tds_convert
> 23:47:24.452384 cs_convert() tds_convert returned 129024
Type 34 is image; type 35 is text. Your document file data is, I believe,
being converted to a hexadecimal string of [[:xdigit:]]+. Unless you're
going to unhexify it later -- requiring an antiwitch, so I'm told --
that's not what you want. Badder still, it wanted twice the bytes
(129024), probably half what you allocated.
Whoever thought there were people still walking around who never heard of
"convert failed for 11"? Well, maybe now there aren't.
HTH.
--jkl
-
[freetds] Data-conversion resulted in overflow on image column,
John Gilmore-Baldwin, 04/05/2006
- <Possible follow-up(s)>
-
Re: [freetds] Data-conversion resulted in overflow on image column,
Thompson, Bill D (London), 04/05/2006
-
Re: [freetds] Data-conversion resulted in overflow on image column,
John Gilmore-Baldwin, 04/05/2006
-
Re: [freetds] Data-conversion resulted in overflow on image column,
James K. Lowden, 04/05/2006
- Re: [freetds] Data-conversion resulted in overflow on image column, John Gilmore-Baldwin, 04/06/2006
-
Re: [freetds] Data-conversion resulted in overflow on image column,
James K. Lowden, 04/05/2006
-
Re: [freetds] Data-conversion resulted in overflow on image column,
John Gilmore-Baldwin, 04/05/2006
-
Re: [freetds] Data-conversion resulted in overflow on image column,
michael . peppler, 04/06/2006
- Re: [freetds] Data-conversion resulted in overflow on image column, John Gilmore-Baldwin, 04/06/2006
Archive powered by MHonArc 2.6.24.