Skip to Content.
Sympa Menu

freetds - Patch to get IMAGE working for MSSQL2k

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Patch to get IMAGE working for MSSQL2k
  • Date: Tue, 9 Jul 2002 18:38:06 -0700


Hi all, I tried to store some large binary objects in an IMAGE column
and couldn't get it to work (Linux x86 + Perl + DBD::Sybase + MS SQL
Server 2000 via TDS 7.0). I think there have been some other threads
previous to this but it's not clear that anyone has been successful at
this.

It turned out to be a fairly simple fix. Essentially all I had to do
was add a case for SYBTEXT in tds_convert_binary() and repair the
hexification part which was suffering from sign problems. Obviously,
this has TEXTSIZE limitations, but in my test I was able to store and
retrieve a 283k JPEG image after a 'SET TEXTSIZE 512000'.

I'd like to suggest it squeak into 0.60, but I realize it's the 11th
hour. This patch also includes the much-discussed TEXT truncation fix.

Thanks,
Eric


----------------------------------------------------------------------
Eric Deutsch email: edeutsch AT systemsbiology.org
Institute for Systems Biology Voice: (206) 732-1397
1441 N 34th St FAX: (206) 732-1260
Seattle, WA 98103-8904 http://www.systemsbiology.org/

Attachment: convert.patch
Description: Binary data



  • Patch to get IMAGE working for MSSQL2k, Eric Deutsch, 07/09/2002

Archive powered by MHonArc 2.6.24.

Top of Page