Hi ppl,
I've got a problem, which has puzzled me for a long time! I'm making a simple perl script that updates a MS Access database using the Win32::ODBC library from user input from a form, but it doesn't work. I've narrowed it down to the following lines:
$fields{'SelectSecondary'}, $fields{'url'}, $fields{'name'})";
$conn = new Win32::ODBC("website");
if (!$conn) {
die "ODBC DSN error: [$!].\n";
}
I used this "if" statement, as the standard library error function "$conn->Error();" gives an error stating that $conn is undefined. This means that the object creation did not work. Also "$!" gives nothing.
Thanks for your help!
Simon Liu
I've got a problem, which has puzzled me for a long time! I'm making a simple perl script that updates a MS Access database using the Win32::ODBC library from user input from a form, but it doesn't work. I've narrowed it down to the following lines:
Code:
$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";
}
I used this "if" statement, as the standard library error function "$conn->Error();" gives an error stating that $conn is undefined. This means that the object creation did not work. Also "$!" gives nothing.
Thanks for your help!
Simon Liu