Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
... my $user = $mydb::Config::odbc_def->{ $db } { user }; my $pass = $mydb::Config::odbc_def->{ $db } { pass }; $dbh = DBI->connect("DBI:ODBC:$db",$user, $pass, {RaiseError => 1}); # Insert pdf file attached with the reference number. my $sql="UPDATE main SET pdf='$pdf_file[0]' WHERE number='$number' AND + ref='$ref'"; $sth = $dbh->prepare($sql); $sth->execute() || die $sth->errstr; $dbh->disconnect or warn "Disconnection failed: $DBI::errstr\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inserting an PDF to SqlServer using Perl
by almut (Canon) on Jul 02, 2007 at 21:17 UTC | |
by Anonymous Monk on Jul 02, 2007 at 21:40 UTC |