I have the following ASP code that works fine, up to the IF statement. I'm trying to display an image based on the result of the MachineName variable.I'm getting "incorrect syntax errors" where the IF statement begins.Code:set rsqdb = conn.Execute ("Select MachineName, KPName, Severity, " _& " EventMSG + '; ' + AgentMsgShort as EventMessages, DateAdd(ss, LastOccurTime-3600, '1969-12-31T18:00:00.000') as OccurTime " _& " From Event, EventDetail " _& " Where Severity < 6 " _& " AND Status = 0 " _& " AND EventDetail.EventID = Event.EventID " _& " AND AgentMsgShort <> 'NULL' " _& " AND CAST(FLOOR(CAST(DATEADD(S,LastOccurTime, '1969-12-31T18:00:00.000') AS FLOAT)) AS DATETIME) >= (getdate() -1 ) " _& " AND EventMSG NOT LIKE '%Work Queue Length%' " _& " AND EventMSG NOT LIKE '%DRA Outbound%' " _& " AND EventMSG NOT LIKE '%Report Creation Failed%' " _& " AND EventMSG NOT LIKE '%NCOGateway%' " _& " AND EventMSG NOT LIKE '%Diagnostic Console%' " _& " AND EventMSG NOT LIKE '%Pdsk%' " _& " AND EventMSG NOT LIKE '%EventLog does not exist%' " _& " Order By OccurTime DESC " _ &" If Machinename = 'enpefr' then " _&" <img src="map10.jpg"> " _&" end if ")
Any help is appreciated!