melnib00ne Posted November 19, 2007 Share Posted November 19, 2007 Hello,can anyone help me to work on the script below ? it came the errormessage:Zeile: 20Zeichen: 5Fehler: Fehler bei einem aus mehreren Schritten bestehenden Vorgang. Prüfen Sie die einzelnen StatuswerteCode: 80040E21Quelle: Microsoft Cursor Engineand thats the vb script:Set objConn = CreateObject("ADODB.Connection")Set objRS = CreateObject("ADODB.Recordset")objConn.Open "DSN=EventLogs;"objRS.CursorLocation = 3objRS.Open "SELECT * FROM EventTable" , objConn, 3, 3strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colRetrievedEvents = objWMIService.ExecQuery _ ("Select * from Win32_NTLogEvent")For Each objEvent in colRetrievedEvents objRS.AddNew objRS("Category") = objEvent.Category objRS("ComputerName") = objEvent.ComputerName objRS("EventCode") = objEvent.EventCode objRS("Message") = objEvent.Message objRS("RecordNumber") = objEvent.RecordNumber objRS("SourceName") = objEvent.SourceName objRS("TimeWritten") = objEvent.TimeWritten objRS("Type") = objEvent.Type objRS("User") = objEvent.User objRS.UpdateNextobjRS.CloseobjConn.Closewhere is the error ? i dont knew....thanks/krMelnib00ne Link to comment Share on other sites More sharing options...
IcemanND Posted November 19, 2007 Share Posted November 19, 2007 Not sure exactly what your error is, but did you create the database with the table and then create a DSN to it? If not see (last half): http://www.microsoft.com/technet/scriptcen...k.mspx?mfr=trueWasn't sure if you got the scrit from there or the scriptcenter. Link to comment Share on other sites More sharing options...
melnib00ne Posted November 20, 2007 Author Share Posted November 20, 2007 Hi,thanks for answer. Yes, i'am sure, thats the same script. I have an dsn to the access database, the table in the access database is the same... i copy and paste the script from microsoft also in an new script, but the errormessage was the same..... any ideas ?/krMelniboone Link to comment Share on other sites More sharing options...
fizban2 Posted November 20, 2007 Share Posted November 20, 2007 doubl check the field types for each of the fields you are entering, it is failing on the update so you are looking at a possible incorrect type mismatch, or that one of the properties is not support, for the DSn are you using OLE? Access? Link to comment Share on other sites More sharing options...
melnib00ne Posted November 20, 2007 Author Share Posted November 20, 2007 fizban2,it works.. the fieldtypes in the access database doesnt work in time/date-format, it must be text, after script runs, i must convert it into german or international dateformat...thank you all very much..../krMelnib00ne, Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now