for your first problem....
presumably you are connecting to a database, and trying to output results?
before you can output anything, you need to check the database has actually returned something. you can do this by using ASPs built in EOF function. EOF means End of File. If you are opening a recordset, and then outputing data, use an if statement to check that you have actually got data before outputting it:
- Code: Select all
rs = 'RECORDSET THAT IS OPEN
if rs.EOF = FALSE then
'CODE TO DISPLAY RECORDSET INFORMATION
else
response.write "The query returned no results"
end if