# Load necessary modules use Win32::ODBC; use CGI; use CGI::Carp qw(fatalsToBrowser); # DNS related Variables... $username = "foo"; $password = "bar"; $database_path = "name_of_my_database.mdb"; #create database object called $db... $db = new Win32::ODBC("DNS=$database_path;UID=$username;PWD=$password"); # These lines do not give me an error... # Doesn't this mean I have a proper connection? if (undef $db){ Win32::ODBC::DumpError(); } # This line gives me an error which says something # like Can't call method "Connection" on undefined # value... $con_number = $db->Connection;