DBI ODBC

From: Michael (mpzacharias_at_yahoo.ca)
Date: 01/06/04


Date: Tue, 06 Jan 2004 19:06:03 GMT

I have a small perl script that inserts data from a tab file to an Access
database.

my $sth = $dbh->prepare(<<SQL);
INSERT INTO Notes ("Account Number", "NUM", "DESC", "UID", "NOTES")
VALUES(?,?,?,?,?)
SQL

$sth->bind_param(1,$rec[0],SQL_VARCHAR);
$sth->bind_param(2,$rec[1],SQL_VARCHAR);
$sth->bind_param(3,$rec[2],SQL_VARCHAR);
$sth->bind_param(4,$rec[3],SQL_VARCHAR);
$sth->bind_param(5,$rec[4],SQL_VARCHAR);

$sth->execute;

...

The script is failing part way through the tab file with the error:

DBD::ODBC::st bind_param failed: [Microsoft][ODBC Microsoft Access
Driver]Invalid precision value ...

Any help or hints about this error would be appreciated...

Michael



Relevant Pages

  • Re: Mail-merging with Word, MySQL... and Perl?
    ... Alt+F9 to toggle off their display. ... connection to my MySQL database on my Linux box. ... Or if a couple has its anniversary listed, I'll want to format ... the Perl script directly (which would be written to generate that data in ...
    (microsoft.public.word.mailmerge.fields)
  • Re: DBI with ORACLE encryption
    ... perl script to pull data out of the interface and dump the same to the ... All we do with oracle is to take an database connection ... other ways of connecting to database using dbi. ...
    (perl.dbi.users)
  • Memory fault(coredump) with two DBD type connections
    ... successfully connect to Oracle databases via a Perl script. ... can successfully connect to DB2 databases via a Perl script. ... when I try to connect to the same Oracle database AND same DB2 database ... 27203 Allow compiling swigged C++ code ...
    (perl.dbi.users)
  • perl with mysql which takes a file as a input that contains t he info to create the tables
    ... inserting values into the database. ... only procedure for taking input from a file (using perl script) into ... MySQL database is through place holders. ... Where the passlist.txt hav the data in the format ...
    (perl.beginners)
  • Re: connect to a remote Postgresql server using DBI
    ... else) to execute queries on the remote database. ... perl script to execute queries on the remote server? ... > See the bottom of this page for client installation ...
    (perl.dbi.users)