OPTION EXPLICIT DIM strEventSinkDBConn, objEventSinkDB, rsCheck4Errors, intCheckInterval strEventSinkDBConn = "DSN=EventSink" 'Set the connection string to the name of the system DSN Set objEventSinkDB = CreateObject("ADODB.Connection") 'Create an ADODB connection object objEventSinkDB.commandtimeout=90 objEventSinkDB.Open strEventSinkDBConn 'Open that connection objEventSinkDB.Execute("delete from tblInBound where tblInBound.id in (select A.id from tblInBound AS A INNER JOIN tblInBound AS B on (A.RecordNumber=B.RecordNumber AND A.ComputerName=B.ComputerName AND A.LogFile=B.LogFile AND A.id <> B.id));")