ODBC - SQL Server image data problems with recent releases of ODBC

I have a Perl program that writes binary data to a SQL Server image
field using DBD::ODBC.

This works fine in Perl 5.8.8 build 822 ($DBD::ODBC::VERSION = '1.13';)

However, there are two problems with build 824 with an upgraded ODBC or
with Perl 5.10.0 build 1004.

First - data written to the image field is being truncated, i.e. not all
of the data shows up in the database. Writing the data to a file at the
same time as writing to the database shows that program is still
generating the data correctly, so the fault is with DBI or DBD::ODBC.

Second - on reading the data, ODBC thinks the size is longer than it
actually is and gives me right truncation errors unless I increase the
long read length by a factor of 10.

Does anyone have any clue as to what might be happening here for me. Any
help would really be appreciated.

Thanks
Horace

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Horace Redelmyer [ So, 25 Januar 2009 20:44 ] [ ID #1986541 ]

Re: ODBC - SQL Server image data problems with recent releases of ODBC

I haven't solved the problem yet, but I did notice this in
DBD-ODBC-1.17/Changes for September 3, 2008

> Added workaround for problem with the Microsoft SQL Server driver when
> attempting to insert more than 400K into a varbinary(max) or
> varchar(max) column. Thanks to Julian Lishev for finding the problem
> and identifying 2 possible solutions.
It looks to me as if this might have broken handling for the image type
(my truncated image is just over 600K)

Thanks
Horace
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Horace Redelmyer [ Di, 27 Januar 2009 16:15 ] [ ID #1986806 ]
Perl » gmane.comp.lang.perl.active-perl » ODBC - SQL Server image data problems with recent releases of ODBC

Vorheriges Thema: Regarding DBD-ODBC in ActivePerl5.8.8.818
Nächstes Thema: ppm launch error