|
Hi i m working on my high school project and trying to connect to MS Access database by using Perl though i 'm able to connect with the databse but was unable to extract data from the table in the database.here i''m sending the coding alongwith the error i'm getting.
Plz help me
-----------------------code-----------------------
#!c:/phpdev/perl/bin/
use Win32::ODBC;
# 'data' is the name of the database i'm using
$db = new Win32::ODBC("data");
if(! $db ) {
print "Error - data database not found! \n";
}
else {
print "Present \n ";
}
@tables = $db->TableList();
printf ("I found these tables: %s \n", join(" ", @tables));
$db->Sql("SELECT * FROM tbl") || die "Can't execute \n";
-----------------------code-finish-----------------------
-----------------------Output--------------------------
Present
I found these tables: tbl
Can't execute
--------------------------------------------------------
here database has table with name tbl which is found.
Sethi
|