Out of Memory Dumping Event Logs to a database

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Greetings all,
I was playing around with a script on the script repository that allows you to dump the previous day's event log events to a database.

It is a really neat script, but there is one problem. After you have ran it for a few days, you will start getting out of memory errors. I am 98% certain that it is line 6 causing it, since it is trying to open a record set that has all of the records in it (my database is a couple of Gig).

Line 6 is:
objRS.Open "SELECT * FROM EventTable" , objConn, 3, 3

Any suggestions on how to get around this?

Any help is appreciated,

Thanks,
Mike Scott
http://msthenetworker.blogspot.com/