Hi all,
I have a database table which contains lots of records.
When I run a page in my asp script, I need it to do a check on the current SQL lookup recordset to see if there are any records that match the SQL query.
Depending on the results, depends on the html code that gets displayed next.
I have tried this, but I still get an error saying no records found.
Any ideas would be most welcomed.
Thanks,
Barry
ICT Network Administrator
IT Services Manager
I have a database table which contains lots of records.
When I run a page in my asp script, I need it to do a check on the current SQL lookup recordset to see if there are any records that match the SQL query.
Depending on the results, depends on the html code that gets displayed next.
I have tried this, but I still get an error saying no records found.
Code:
strsql4 = "SELECT * FROM ([PC Software] LEFT JOIN [PC Hardware] ON [PC Software].pcid = [PC Hardware].id) LEFT JOIN Software ON [PC Software].softwareid = Software.id WHERE [PC Hardware].id = " & ID & " ORDER BY AppMan, AppName, AppVer;"
set rs4 = conn.Execute(strsql4)
' Check to see if there is any software allocaited to this PC.
If not rs4.BOF then
%>
<!-- Show software list -->
<html>...
<%
Do While Not rs4.EOF
%>
<tr><td class="normal"><%=rs4.Fields("AppMan").Value%> <%=rs4.Fields("AppName").Value%></td><td class="normal"><%=rs4.Fields("AppVer").Value%></td><td class="normal"><%=rs4.Fields("ActivationKey").Value%></td></tr>
<%
rs4.MoveNext
Loop
%>
...</html>
<%
else
%>
<!-- No software allocaited -->
<html>
<head>...
...</html>
<%
end if
Any ideas would be most welcomed.
Thanks,
Barry
ICT Network Administrator
IT Services Manager