update set = where delete from where or insert into (,) values(,) #### sub db_connect { $DSN = "foo"; if (!($db = new Win32::ODBC("dsn=bar;uid=user;pwd=pass"))) { print "Error connecting to $DSN\n"; print "Error: " . Win32::ODBC::Error() . "\n"; exit; } } sub do_query { # reads from a var called $SQL if ($db->Sql($SQL)) { print "SQL failed. \n"; print "Error: " . $db->Error() . "\n"; $db->Close(); exit; } }