[freetds] error for insert into varbinary column: Implicit conversion from data type varchar to varbinary is not allowed

Hari Krishna Dara haridara at gmail.com
Fri Feb 26 13:52:41 EST 2010


>
> Date: Fri, 26 Feb 2010 15:30:05 +0100
> From: Frediano Ziglio <freddy77 at gmail.com>
> Subject: Re: [freetds] error for insert into varbinary column:
>        Implicit        conversion from data type varchar to varbinary is
> not allowed
> To: FreeTDS Development Group <freetds at lists.ibiblio.org>
> Message-ID:
>        <aa1b71111002260630p3904d213jffd79fabbd1b975d at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> > Since I am using pyodbc.Buffer (which itself is mapped to python's
> built-in
> > buffer type), this is not text. If somewhere in the stack, it is being
> > treated as text, then it is a bug.
> >
> > -- Hari
>
> To narrow down the problem a DM log would help. If program bind
> pyodbc.Binary type to text this is a problem in pyodbc.
>
> Regards
>  Frediano
>
> I doubt it is a pyodbc binding problem since the same code works with
easysoft driver and all drivers on windows.  Besides, it is not even
reaching the bind stage yet, it fails right at the prepare. I have tracing
enabled for pyodbc and I can confirm that it fails in the prepare and bind
is not called yet. Also, when running in debug versions of python, pyodbc,
unixodbc and freetds the breakpoint is never reached when set in
SQLBindParameter. I can also confirm this from the DM log. I am attaching
the log generated while using freetds as well as easysoft, so you can see
the difference (it will help you open them side by side by using tool such
as vim diff). I am also attaching the freetds dump file in case it helps.

-- 
Thank you,
Hari
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unixodbc.log.freetds
Type: application/octet-stream
Size: 7361 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20100226/2b76319c/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unixodbc.log.easysoft
Type: application/octet-stream
Size: 9757 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20100226/2b76319c/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetds.log
Type: application/octet-stream
Size: 41856 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20100226/2b76319c/attachment-0002.obj 


More information about the FreeTDS mailing list