View Single Post
  #2 (permalink)  
Old December 31st, 2008, 05:09 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

Hmm. Two things:

First by doing this:

asp Code:
<%response.write rsqdb("name")%>

You are making the assumption that your recordset will always have data in it which you should not do.

You might want to try something like this:

asp Code:
if not rsqdb.EOF then
    response.write rsqdb("name")
end if

Second, the following code is unnecessary:

asp Code:
<%do while not rsqdb.EOF%></do>

Since you are looping the recordset just to loop it. Also I am not sure what '</do>' is, but it is not a valid tag.

Finally, the answer to your question: The reason you are getting the error about the column not existing is because it doesn't. While you select j.Name in your sql query you alias it as JobName so, therefore, you must reference it as such:

<%response.write rsqdb("JobName")%>

Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."