Simonliu
07-08-2003, 10:10 PM
Hi ppl,
I have a really annoying problem with this Perl script of mine, where it accepts user input and updates a MS Access 2000 database with it, through an ODBC connection made by using the Win32::ODBC library. The problem is that the connection keeps on failing, but there is no error message that appears!
The main bit of problematic code is:
$query = "INSERT INTO MAIN (category, subcategory, url, user) VALUES ($fields{'SelectPrimary'},
$fields{'SelectSecondary'}, $fields{'url'}, $fields{'name'})";
$conn = new Win32::ODBC("website");
if (!$conn) {
die "ODBC DSN error: [$!].\n";
}
Where the script dies on the "if" statement, but no error messages are produced since there is nothing displayed in the square brackets. So what is going on? Also, could it be a problem with the webserver that I am running? Its IIS 5.0, and i'm not sure how to configure it (I only stuff about Apache).
I'll be glad to send anyone who requests it, the source code of the script.
Any help with this problem will be greatly appreciated,
Simon Liu
I have a really annoying problem with this Perl script of mine, where it accepts user input and updates a MS Access 2000 database with it, through an ODBC connection made by using the Win32::ODBC library. The problem is that the connection keeps on failing, but there is no error message that appears!
The main bit of problematic code is:
$query = "INSERT INTO MAIN (category, subcategory, url, user) VALUES ($fields{'SelectPrimary'},
$fields{'SelectSecondary'}, $fields{'url'}, $fields{'name'})";
$conn = new Win32::ODBC("website");
if (!$conn) {
die "ODBC DSN error: [$!].\n";
}
Where the script dies on the "if" statement, but no error messages are produced since there is nothing displayed in the square brackets. So what is going on? Also, could it be a problem with the webserver that I am running? Its IIS 5.0, and i'm not sure how to configure it (I only stuff about Apache).
I'll be glad to send anyone who requests it, the source code of the script.
Any help with this problem will be greatly appreciated,
Simon Liu