|
H650242,17/04/2007 10:34:32
This is my code
Set objShell = CreateObject("WScript.Shell")
objShell.CurrentDirectory = "\\h505050\C$\Program Files\Log Parser 2.2\"
Set objLogParser = CreateObject("MSUtil.LogQuery")
Set objinputFormat = CreateObject("MSUtil.LogQuery.CSVInputFormat")
Set objOutputFormat = CreateObject("MSUtil.LogQuery.ChartOutputFormat")
objOutputFormat.chartType = "BarStacked"
objOutputFormat.chartTitle = "Creation Times taken from Active Directory"
objOutputFormat.fileType = "gif" 'GIF BMP
objOutputFormat.groupSize = "800x600"
objOutputFormat.Values = "OFF"
strQuery = "select Year, Month, count(*) using Extract_Token(Date,1,'/') as Month, Extract_Token(Date,2,'/') as Year into " & "\\h505050\c$\wamp\www\helpdesk\assets\lp_output\interrogation\graph.gif" & " From 'C:\wamp\www\helpdesk\pc_audits\creation\*.csv' group by Year,Month"
objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat
And on running this code here is the error
Error: Error executing query: Column Month is not an INTEGER nor a REAL [Type mismatch.] Code: 80020005 Source: CLogQueryClass
And the exact line that is causing this error within the code is:
objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat
Do you think you could take a look at this and correct what ever is making the error,as I really am lost, regards Mr Ghelani |