I need to store more than 9,000 bytes of text in a column in a SQL
Server database and use ColdFusion to extract the data. I have been
trying with an image column. When I query wtih cfm i get a bunch
of gibberish, I can't tell if the insert isn't working or if the
query can't handle the binary results.
I'm sure these problems (both insert and cfm query) have been solved
and at least the Perl one posted to the list but I can't find searchable
archives. I guess one alternative is to store the data in an include
file and the address of the include in the database, but I would
like to avoid this.
I have been having trouble subscribing to this list - please respond
directly.
Thanks in advance,
-John
So far the closest code I think I have written is this (no errors
reported at insert - error trapping removed):
my $long = "A23456789B" x 1000;
$long = $dbh->quote( $long, SQL_LONGVARBINARY );
my $sql = "INSERT INTO TestImage( ImageType ) VALUES ( ? )";
my $sth = $dbh->prepare( $sql );
$sth->bind_param( 1, $long, { TYPE => SQL_LONGVARBINARY } );
my $ret = $sth->execute( $long );