Skip to Content.
Sympa Menu

freetds - [freetds] Image data type in perl/mssql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Maciej Grzywocz <emgie AT netinfo.pl>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Image data type in perl/mssql
  • Date: Tue, 28 Jun 2005 16:01:14 +0200

Hi,

I'm trying to manage some 'image' type fields using Perl and MSSQL2000
server. What I get if I use DBD::Sybase driver is a hex representation
of the data. I use
pack 'H*', $data
to convert it to binary.
However, I am unable to store every binary data, because it must be
stored as a string, so when it contains a zero character (0x00), the SQL
query gets broken.

What I actually need is to copy the binary data from one to another row,
so they don't need to be fully retrieved by my application.
But executing
UPDATE files SET preview = (SELECT preview FROM files WHERE id = 2)
WHERE id = 1;
causes an error:
"The text, ntext, and image data types are invalid in this subquery or
aggregate expression"

Can you help me with this or give another solution?

TIA,

--
Maciej Grzywocz <emgie AT netinfo.pl>
Netinfo: Dział Rozwoju Produktów
tel: 32.3460490 fax: 32.3460492
http://www.netinfo.pl/




Archive powered by MHonArc 2.6.24.

Top of Page