-
recordset within a recordset
Hi, Everyone:
Does anyone know how to loop a recordset which is within another recordset
loop? Here is my code:
-------------------------------
rs.Open datasource
set getFirst = rs.Execute ("select * from FirstTable")
Do While Not getFirst.EOF
getSecond=rs.Execute("select * from SecondTable" _
& " where SomeID= " & getFirst.Fields("FirstID"))
Do While Not getSecond.EOF
response.write getSecond.Fields("SomeField") & "<br>"
getSecond.MoveNext
Loop
getFirst.MoveNext
Loop
---------------------------
This didn't work and the error message says, "Object doesn't support this
property or method: 'EOF' "
I used a different recordset name for the second query but same thing happened.
Any idea?
Nathan Chen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks