http://www.perlmonks.org?node_id=1024182


in reply to dbd odbc sql big file blues

Sorry for the misspellings above, that was me. Allow me to attempt to illuminate.
I can connect fine, and I use the

$cmd=$dbh->prepare(....); $cmd->execute(); $cmd->finish;

throughout. My file column is

varbinary(max)

, and to insert I do a

$cmd=$dbh->prepare("insert into filestable (filescolumn) values(?)"); $cmd->bind_param(1,$binfilecontents, DBI:SQLVARBINARY); $cmd->execute; $cmd->finish;

This works great for most small files, gives me 0x for some, and for others (about 350kB) I get the hy090 error. I read somewhere that this indicates a negative buffer length somewhere, but am having no luck figuring out how to fix it. Please elighten me so I may progress in my training. Thanks.