> 
> Ok, y'all built my confidence up enugh to set up this test 
> script, but it 
> isn't working.  Can someone decipher what I am still doing wrong 
> inserting a BLOB in a Access database?
> 
> <code here>
> 
> my $dbh = DBI->connect("dbi:ODBC:test") || die DBI::errstr;
> my $sth = $dbh->prepare("INSERT INTO test (attachment1)
>                          VALUES (?)
>                         ") || die DBI::errstr; 
> $sth->bind_param(1,binmode($in{'file'}), 
> DBI::SQL_LONGVARBINARY);
> $sth->execute;
> $dbh->disconnect();


Binmode doesn't read the file, it just sets the read mode of a the file.
Read the file into a variable, then insert it.  Note, in my longbin,
there's a function that does this and returns the contents of the file.

Regards,

Jeff


Reply via email to