I am having almost the same error on a windows 2003 server. Same set of
scripts run fine on a Windows XP,
the following is the error:
DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver] 囀湔祛堤 (SQL-22018)(DBD: st_execute/SQLExecute err=-1) at c:\web\factory.pl line
61.
it failed at the line to execute after prepared the sql.I wish someone will
shed some light on this. Thanks.I am using the format of
DBI->connect('dbi:ODBC:mydsn');I think. What is the difference?the sample
code as following:my ($dbh, $sth);my $dsn = "dbi:ODBC:btn";my $user
="";my $pswrd ="";my $driver = "ODBC";my $wkno;use Time::gmtime;my
$ltime=localtime(time);open(LOG,">>chkorder.log");print LOG
"$ltime~~$ord_num~~\t$ENV{'REMOTE_ADDR'}\t$ENV{'HTTP_USER_AGENT'}\t$ENV{'REMOTE_HTTP_REFERER'}\n";close(LOG);$sql="Select
refno, workno,prdcode,prdDesc,duedate from wkMaster WHERE wkmaster.refno
like '$ord_num%'"; print $starter; $dbh =
DBI->connect($dsn,$user,$pswrd,$driver,{RaiseError=>1}) or die "Database
connection not made: $DBI::errstr"; $sth = $dbh->prepare($sql);
$sth->execute();It failed at the last line shown above. I highly appreciate
your help!Samuel
----- Original Message -----
From: "Martin Evans" <[EMAIL PROTECTED]>
To: "dbi-users" <dbi-users@perl.org>
Sent: Wednesday, August 15, 2007 3:31 AM
Subject: Re: DBI DBD-ODBC
[EMAIL PROTECTED] wrote:
I created an MSACCESS Database on my Windows XP O/S, set up the System
Name in the DATA SOURCES panel associating the "Microsoft Access
Driver(*.mdb) with my database name (db1). I installed the DBI Module
and DBD-ODBC and I still get the following error when I run my PERL
script..
Could not make a connection to the database: [Microsoft][ODBC Microsoft
Access D
river]General error Not enough information to connect to this DSN with
SQLConnec
t. Use SQLDriverConnect. (SQL-HY000)(DBD: db_login/SQLConnect err=-1)
at C:\Do
cuments and Settings\O015181\Desktop\Edit1.pl line 8.
If anyone knows the reason for this error and how I can fix it, I would
appreciate it very much. I am sending this email as a last resort as I
have exhausted
all of my resources.
Regards,
Robert V Simmons
Did you use:
DBI->connect('dbi:ODBC:mydsn');
or
DBI->connect('dbi:ODBC:DSN=mydsn');
I would try the latter.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
__________ NOD32 2461 (20070815) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32.com.hk