Article View: comp.lang.basic.visual.misc
Article #427Re: Nested Loops
From: Stefano Valsecchi
Date: Fri, 09 Apr 1999 00:00
Date: Fri, 09 Apr 1999 00:00
32 lines
1511 bytes
1511 bytes
You need to re-execute the second query in each loop of the first one:
<%
On Error Resume Next
rsa.MoveFirst
do while Not rsa.eof
art = Server.HTMLEncode(rsa("Artist"))
%>
<table row with a record from sql1>
<%
rsb.Open ("SELECT * FROM table WHERE field2 = ' " & rsa("field1") " ' ",
connection, adOpenForwardOnly
rsb.MoveFirst
do while Not rsb.eof
%>
<table row with a record from sql2 where value is from sql1>
<%
rsb.MoveNext
loop
rsb.Close
rsa.MoveNext
loop
%>
Bye
Stefano
Technical Details
Message-ID:
<7ekap7$1co2$1@urano.inet.it>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<ChxO2.6781$033.1981@news.rdc1.il.home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ce47,6178036bc48038df X-Google-Attributes: gid10ce47,public X-Google-Thread: 110e3b,6178036bc48038df X-Google-Attributes: gid110e3b,public X-Google-Thread: 108db9,6178036bc48038df X-Google-Attributes: gid108db9,public X-Google-Thread: fdea5,6178036bc48038df X-Google-Attributes: gidfdea5,public X-Google-Thread: 1477ed,6178036bc48038df X-Google-Attributes: gid1477ed,public From: "Stefano Valsecchi" <valsecchi@txt.it> Subject: Re: Nested Loops Date: 1999/04/09 Message-ID: <7ekap7$1co2$1@urano.inet.it> X-Deja-AN: 464347847 References: <ChxO2.6781$033.1981@news.rdc1.il.home.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: I.NET S.p.A Newsgroups: comp.lang.basic.visual.misc,cz.comp.microsoft.asp,fidonet.asp,microsoft.public.inetexplorer.ie5beta.programming.dhtml.authoring,microsoft.public.inetserver.iis.activeserverpages