Hi everyone,
The following code creates the table in the directory where the Perl script
lives, instead of the directory pointed to by the DSN:
use strict;
use CGI;
use DBI;
$::dbh = DBI->connect("dbi:ODBC:PAS");
my $doval =
$::dbh->do("create table demo"
. " (userid c(20), datetime c(20), request m, hits i)");
print "$doval\n";
$doval =
$::dbh->do("insert into demo (userid, datetime, request, hits)"
. " values ('user', 'time', 'request', 100)");
print "$doval\n";
The create table returns -1 (which is correct). The insert fails because the
table cannot be found, since the dbh is looking in the DSN's directory as it
should.
Am I doing something wrong? This seems peculiar to me!
Thanks a million,
Stephen Toney
Systems Planning
[EMAIL PROTECTED]
http://www.systemsplanning.com