Skip to Content.
Sympa Menu

freetds - Re: [freetds] Data-conversion resulted in overflow on image column

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: John Gilmore-Baldwin <jbaldwin AT theolympian.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Data-conversion resulted in overflow on image column
  • Date: Thu, 06 Apr 2006 00:03:57 -0800

I thank you for your truly enlightening post. Laughing and learning is a
great combination.

And now I apologize because I fear I'm veering slightly off topic here,
but...

Since I'm doing all of this in perl, and therefore not directly allocating
any memory at all, does anyone have any idea how to work around this? I can
work with a double-length hex string if need be, or some way of having no
conversion at all.

Thanks,

John, who now holds his head up proudly because he's joined the ranks of the
"convert failed for 11" knowledgeable.


On 4/5/06 5:48 PM, "James K. Lowden" <jklowden AT freetds.org> wrote:

> 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 mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

--

John Gilmore-Baldwin
Information Systems Director



111 Bethel Street N.E.
Olympia, WA 98506
Tel (360) 754-5497
Fax (360) 754-4221
jbaldwin AT theolympian.com









Archive powered by MHonArc 2.6.24.

Top of Page