This is my first week with Perl so please excuse the newbie question. I've been through the Win32::ODBC tutorial and Mr. Roth's faqs but I can't seem to find an answer to this (probably) basic question: when I run this script, I get a "Can't run Sql on an undefined value" error.
use Win32::ODBC;
my($db) = new Win32::ODBC("dsn=Map");
$db->Sql("SELECT * FROM States");
while ($db->FetchRow()) {
my(%data) = $db->DataHash();
Print "$data{'ID'}";
print "$data{'State'}";
}
$db->Close();
When I installed Win32::ODBC, I ran the test.pl script and it worked fine. Why can't I set my dsn? Thanks