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

michael.peppler at bnpparibas.com michael.peppler at bnpparibas.com
Thu Apr 6 03:14:38 EDT 2006


Try setting $dbh->{syb_binary_images} = 1 and rerun the query.

The truncation issue may be a bug in DBD::Sybase, but that code has been
around for several years and I haven't heard of any problems before now...

Michael




Internet
jbaldwin at theolympian.com@lists.ibiblio.org - 06/04/2006 10:03


Please respond to freetds at lists.ibiblio.org

Sent by:    freetds-bounces at lists.ibiblio.org

To:    freetds

cc:


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


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





_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
 http://lists.ibiblio.org/mailman/listinfo/freetds



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.




More information about the FreeTDS mailing list