# perform the connection using the Oracle driver my $dbh = DBI->connect("dbi:Oracle:$database", "$username", "$password", { PrintError => 0, RaiseError => 0 }) or die "Can't connect to the database: $DBI::errstr\n"; print "INFO: connected to $database OK, updating picture_table with $photo\n"; # prepare update statement print "INFO: reading $photo to blob\n"; open (BLOB, "<$photo") or die "Can't open $photo: $!"; binmode BLOB; { local($/) = undef; $blob = ; } close (BLOB); $quotedblob = $dbh->quote($blob); # THIS ALL WORKS BAR THE BLOB UPLOAD...!!!! #my $sth = $dbh->prepare ("update ssi_pri_photos set recorded = sysdate, recorded_by = 'David', photograph = '$blob' where person_number = '$person_id'"); #my $sth = $dbh->prepare ("select recorded_by from ssi_pri_photos"); my $sth = $dbh->prepare ("update ssi_pri_photos set recorded = sysdate, recorded_by = 'David', photograph = ? where person_number = $person_id"); $sth->bind_param(1, $quotedblob, SQL_LONGVARBINARY); # execute the statement in the database $sth->execute or die "Can't execute SQL statement: $DBI::errstr\n";