Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query not returning recordset

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

I've got a query that works in Access but when I execute it in my ASP script it doesn't return any results:

TBL.Open "SELECT Topics.TopicID, Topics.Topic, Threads.ThreadID, Threads.Subject " &_
"FROM Topics LEFT JOIN Threads ON Topics.TopicID=Threads.TopicID " &_
"WHERE Topics.TopicID=4 " &_
"ORDER BY Threads.Subject;", DB

Where am I going wrong?

Thanks very much

Ed
 
Send your connection string ect... IF not make sure you have an open connection.
 
You might want to try this sql instead.
SELECT T.TopicID, T.Topic, TH.ThreadID, TH.Subject
FROM Topics T LEFT JOIN Threads TH ON T.TopicID=TH.TopicID
WHERE T.TopicID=4
ORDER BY TH.Subject
 
Hi,

Thanks for the suggestions - in the end it turned out I was using the same variable name for two separate bits of data so when it came to display the information I had reset it to blank somewhere else.

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top