FINALLY retrieved my ps content from the db, however, I have discovered that I'm also concatenating the data inserted into the table. Selecting is fixed...back to working on getting the data in there. I've applied the blob update code from the DBD::Sybase documentation you linked, but now I'm getting:
My previous insert was letting sql convert the binary for me. But, now I'm not sure if I'm converting the binary data correctly in this method or not.DBD::Sybase::st syb_ct_send_data failed: Server message number=102 sev +erity=15 state=1 line=1 server=SQL2008\SQL2008 text=Incorrect syntax near '0x00000000000000000000000000000000'.
sub printTransaction{ ... my $statement ="insert into PrintedChecks (Checkid,[datetime],id,print +edby,data) values (?,?,?,?,cast(? as varbinary(MAX))) "; my $sth=$db->prepare($statement); eval{ $sth->execute(($checkid,$now,$id,$userid,'')); }; if ($@){ $db->rollback; return 0; } $db->commit; $sth = $db->prepare("select data from printedchecks where id = '$id'") +; $sth->execute; while($sth->fetch) {$sth->syb_ct_data_info('CS_GET', 1);} $sth->syb_ct_prepare_send(); my $binary = pack("b*", $print); #Is this right??? $sth->syb_ct_data_info('CS_SET', 1, {total_txtlen => length($binary), +log_on_update => 0}); $sth->syb_ct_send_data($binary, length($binary)); $sth->syb_ct_finish_send(); ... }
In reply to Re^4: sql2008 Filestream
by ksublondie
in thread sql2008 Filestream
by ksublondie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |