Hi all,
The query below works fine when I ran it off the logparser window:
logparser "select date1,date2,id1 INTO C:\Sink.csv FROM C:\Sink.log WHERE date1 > '2009:07:15 16:30:31:36'"
-i:CSV -iHeaderFile:"c:\Header.csv" -nSkipLines:2 -iTsFormat:"yyyy-MM-dd?hh:mm:ss"
Using C# and StringBuilder class I have the following output string:
SELECT date1,date2 INTO 'C:\Sink.csv' FROM c:\Sink.log
WHERE date1 > '2009-07-17 16:42:17' -i:CSV -iHeaderFile:"c:\Header.csv" -nSkipLines:2
-iTsFormat:"yyyy-MM-dd?hh:mm:ss"
also tried with single quotes:
SELECT date1,date2 INTO 'C:\Sink.csv' FROM c:\Sink.log
WHERE date1 > '2009-07-17 16:50:36' -i:CSV -iHeaderFile:'c:\Header.csv' -nSkipLines:2
-iTsFormat:'yyyy-MM-dd?hh:mm:ss'
When I call "LogParser.ExecuteBatch(query, pObjInput, pObjOutput)" I get the error:
{"Error parsing query: Syntax Error: extra token(s) after query: '-i:CSV' [SQL query syntax invalid or unsupported.]"}
System.Exception {System.Runtime.InteropServices.COMException}
Any ideas?
Thank you!