in reply to Re^4: sql2008 Filestream
in thread sql2008 Filestream

my $binary = pack("b*", $print); #Is this right???

pack("b*",...) packs a "bit string", i.e. a string consisting of "0" and "1" (ASCII 48 and 49), e.g.

print pack("b*", "011001101111011011110110") # --> "foo"

but Postscript content doesn't consist of solely ASCII zeros and ones, so this is most likely not correct.

My guess would be that you don't need to do anything with $print.  Just treat it as binary data (any string is "binary" in the wider sense, even if it's ASCII/7-bit only), i.e. use $print where you now have $binary.

Replies are listed 'Best First'.
Re^6: sql2008 Filestream
by ksublondie (Friar) on Mar 02, 2011 at 16:04 UTC
    Hmmmm...well if I pass an unchanged $print to the server, I get the exact same error. I even played around some more to finally get $print into true binary (took me awhile to finally figure out pack), but once again, I get the exact same error. How can I be getting the exact same error when I change the content???

      Not sure what you mean by "true binary".  Anyway, I don't think it has anything to do with the way you format the bulk data.  Rather, it seems to be a bug with DBD::Sybase — at least you're not alone: see [freetds] DBD::Sybase: ct_send_data example fails.

      Sorry, can't help with debugging, as I don't have MS SQL Server.