Hi,
  I'm trying to insert JPGs into a db/2 database. Here's the perl code
I'm using to accomplish this:  

#Open the table, and tell the client to insert a JPG file into the DB.
$sth = $dbh->prepare( "INSERT INTO T301DBA.NPAUX2 (AUXID, AUXVER,
AUXVALUE) VALUES ('1' 1 ?)" );
$sth->bind_param( 1, 'c:/temp/twodogs.seq', {db2_file => 1});
$sth->execute();

the {db2_file => 1} argument to bind_param() came from a suggestion out
of perldoc dbd::db2, but I cannot find any specific examples of this
usage.  Right now the script is failing with this error:

DBD::DB2::st execute failed: [IBM][CLI Driver][DB2] SQL0518N  The
statement name
d in the EXECUTE statement is not in a prepared state or is a SELECT or
VALUES s
tatement.  SQLSTATE=07003

Any suggestions or snippets of code that do the same thing would be very
helpful.

-Aaron
[EMAIL PROTECTED]

Reply via email to