« Previous Next »
Last post 11-03-2009 5:53 PM by jdelinger. 6 replies.
Average Rating Rate It (5)Thank you for the rating!
Page 1 of 1 (7 items)
Sort Posts: Oldest to newest Newest to oldest
hello all,
How Do I get the number of records using the code below? rsLP does not have a method for that :(
Thank you
J
You have to iterate through all LogRecords and count till end is reached. Something like below:while(!rsLP.atEnd()){ count++; rsLP.moveNext();}Thanks,Kanwal
that is exactly what I am trying NOT to do :)I need the total number of records so that I can use that value in a progress bar as I start parsing the logs into a DataTable.
I just cannot believe there is no method to retrieve that info :(
ThanksJ
LogParser doesn't give the count for the same reason. It returns the logrecordset immediately and but the query is actually still processing. As the data is getting produced in the background, you can iterate through the available data.Thanks.Kanwal
that is not good news. I will have to abandon logparser (which I love) and use some other method to import a csv file into a DataTable.
Thanks
How about doing the query twice? Once to get the count(*) and second time to get the actual records?
and how would you do that using the LogQuery object?