troubleshooting Question

Dynamic SQL Query gives one record

Avatar of Wayne Barron
Wayne BarronFlag for United States of America asked on
Microsoft SQL ServerASPSQL
17 Comments1 Solution84 ViewsLast Modified:
Hello all;
I hope that I titled this question properly.

This is the way I have it set up.
Textarea has the name of songs.
One song per Row

Now, this is the Variable, with the generated code from the Textarea.

getAll = "Songs.SongTitle='Strutter ' or Songs.SongTitle='Black_Diamond ' or Songs.SongTitle='Parasite ' or Songs.SongTitle='Strange_Ways ' or Songs.SongTitle='Rock_Bottom ' or Songs.SongTitle='God_of_Thunder' or Songs.SongTitle='Love_Gun' or Songs.SongTitle='She ' or Songs.SongTitle='I_Stole_Your_Love'" 

Open in new window

OK, this is my SQL Query.

getList.commandtext="SELECT Albums.AlbumName, Songs.SongTitle, Songs.Writers, Songs.Vocals, Songs.SID FROM Albums RIGHT OUTER JOIN Songs ON Albums.AID = Songs.AID WHERE "&getAll&""

set rsList = getList.execute
while not rsList.eof%>

Open in new window

The results is:
One single records, instead of the 9 that are listed.

Just now, I removed the WHILE NOT.
To see what it would give, and it gives the same exact results as it does when it is in place.

The script works, with the way I am doing it, just giving on 1 result, instead of the nine that is intended.

Any idea's on this?
(I have been answering my own questions hear lately, just right after posting, so, maybe it will happen again)
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 17 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 17 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004