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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Database Query and Strings!!!

Status
Not open for further replies.

istreet

Instructor
Jun 24, 2002
9
0
0
GB
I have script that searches a database and returns several recordsets based upon a unique id, and presents them on a page(as below):

name : address : email:

The results can range from a single row to multiple rows depending upon the id number what i want to do is turn all the results into a string any ideas? Thanks.
 
Give this a go it'll give you a csv style string
<%
dim mystr

do

mystr=mystr & rst.fields(&quot;FIELDNAME&quot;).value & &quot;,&quot; &
_ rst2.fields(&quot;FIELDNAME&quot;).value & &quot;,&quot; &
_ rst3fields(&quot;FIELDNAME&quot;).value & &quot;,&quot;
rst.movenext
rst2.movenext
rst3.movenext
loop until rst.eof or rst2.eof or rst3.eof
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top