in reply to Re: Re: Inserting file into a database
in thread Inserting file into a database

Okay. For your above script, put some error checking into it so you can see where the failure is taking place.

#!/usr/bin/perl -w use strict; my $filename = "File_Name_One"; my $letter = "A"; my $dbh = DBI->connect("DBI:ODBC:databasename", "","") || die "error: ($DBI::errstr)\n"; my $firstvar = $dbh->quote($filename); my $secondvar = $dbh->quote($letter); my $statement = "Insert into tableOne (filename, letter) values ($firstname, $letter)"; # Now you need to actually execute the statement $dbh->do( $statment ) || die "error: $dbh->errstr\n"; # rest of code

-derby

Replies are listed 'Best First'.
Re: Re: Re: Re: Inserting file into a database
by Anonymous Monk on Jan 13, 2003 at 13:39 UTC
    Thank yous to all.