my $conn = Win32::OLE->CreateObject('ADODB.Connection'); # Open a connection using the SQL Server OLE DB Provider # LogIt( $fhDEBUG, "Opening ADODB connection") if $CONFIG{DEBUG} > 3; $conn->Open(<{State} == adStateOpen) { $connStatus = "Connection was a success"; } else { $connStatus = "Connection failed because "; $connStatus .= $conn->Errors(0)->{Description}; } #LogIt( $fhDEBUG, "COMPLETE: Opening ADODB connection") if $CONFIG{DEBUG} > 3; #changed above line to log status of connection LogIt( $fhDEBUG, $connStatus) if $CONFIG{DEBUG} > 3; # End of 07/04/09 changes