I am trying to determine if a user uploaded a file from FTP using MS Log Parser 2.2
I was not able to get the parser SQL query, although I used a few example queries.
The Down Down water request does not work:
strSQL = "SELECT date,COUNT(*) AS downloads,c-ip " strSQL = strSQL & "FROM C:\temp\Log\*.log " strSQL = strSQL & "WHERE cs-method='RETR' " strSQL = strSQL & "GROUP BY date,c-ip "
Mistake:
RecordSet cannot be used at this time [Unknown Error]
Question:
How to create a request:
- SELECT Date and Time of download - Where user = 'xxx' - WHERE RETR = is a download - WHERE Filename = u_ex150709.log or xxx
Responses to C # are also welcome.
VB.net Code:
Dim rsLP As ILogRecordset = Nothing Dim rowLP As ILogRecord = Nothing Dim LogParser As LogQueryClassClass = Nothing Dim W3Clog As COMW3CInputContextClassClass = Nothing Dim UsedBW As Double = 0 Dim Unitsprocessed As Integer Dim strSQL As String = Nothing LogParser = New LogQueryClassClass() W3Clog = New COMW3CInputContextClassClass() Try strSQL = "SELECT date,COUNT(*) AS downloads,c-ip " strSQL = strSQL & "FROM C:\temp\Log\*.log " strSQL = strSQL & "WHERE cs-method='RETR' " strSQL = strSQL & "GROUP BY date,c-ip " 'run the query against W3C log rsLP = LogParser.Execute(strSQL, W3Clog) 'Error occurs in the line below rowLP = rsLP.getRecord()
Internet engineer
source share