Printing Recordsets from a query
I have a query that gets company name and address info from an access database.
I'm able to print the resultset on the page, but I have a formatting question:
There are two address columns in the database (address1 and address2). Not every company uses address2, so it's blank. When I use the code below, it prints the blank line for those vendors without anything in address2. Is there a way around this problem?
Thanks
Terry
While Not objRS.EOF
Response.Write "<p>" & objRS("companyName") & "<br>"
Response.Write objRS("address1") & "<br>"
Response.Write objRS("address2") & "<br>"
Response.Write objRS("city") & ", " & objRS("state") & " " & objRS("zip") & "</p>"
objRS.MoveNext
Wend
|