So this code works great as long as there is a record otherwise it is just blank, I have tried several if then statements but I can't seem to make it work. How can I if then this statement?:
Code:
<% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT TOP 1 tag, time, round(value, 3) as value FROM pi.piarchive..picomp2 where tag = 'C4_4AQ10P01' and time > DATEADD(DAY, -15, GETDATE()) and value is not null order by time desc" oRs.Open strSQL, conn Do while not oRs.EOF Response.Write "<td align=""center""><input type=""text"" id=""jtd2nox"" value= '" & oRs ("value") & "' name=""jtd2nox"" class=""inputtext1""/></td>" oRs.MoveNext loop %>
Comment