use Win32::ODBC; my $DSNName = "PHOTODSN"; local $db = new Win32::ODBC ("DSN=$DSNName;UID=photouser;PWD=photo#user") || die "Error: " . Win32::ODBC::Error(); my $sqlstrs = "UPDATE......"; if(!$db->Sql($istr)){ print "Succeeded \n"; return 1 }else{ print "Failed ". Win32::ODBC::Error(); return 0; }