use Win32::ODBC; $db = new Win32::ODBC("DSN=clamon.world;UID=scott;PWD=tiger"); if (!$db) { $Message = "The $DSB database is currently unavailable. Try again later."; print $Message; exit(); } if ($db->Sql($Sql_test)) { print "SQL failed.\n"; print "Error: " . $db->Error() . "\n"; $db->Close(); exit; } $db->Sql("SELECT * FROM EMP where EMPNO = 7900"); $db->FetchRow(); %hash = $db->DataHash; foreach $key (sort(keys %hash)) { print $key, '=', $hash{$key}, "\n"; } $db->Close();