|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Nested recordsets - Pulling in current record
Code:
<% Dim rsRecordset__name rsRecordset__name = "7-1203-4" 'default item If (Request.QueryString("current") <> "") Then rsRecordset__name = Request.QueryString("current") End If %> <% Dim rsRecordset Dim rsRecordset_cmd Dim rsRecordset_numRows Set rsRecordset_cmd = Server.CreateObject ("ADODB.Command") rsRecordset_cmd.ActiveConnection = MM_connShnta_STRING rsRecordset_cmd.CommandText = "{call changed.storedprocedurename(?)}" rsRecordset_cmd.Prepared = true rsRecordset_cmd.Parameters.Append rsRecordset_cmd.CreateParameter("param1", 200, 1, 255, rsRecordset__name) ' adVarChar Set rsRecordset = rsRecordset_cmd.Execute rsRecordset_numRows = 0 %>
The above is what is typically created when using Dreamweaver to pull in data (stored procedure). I have one recordset that loops through a set of products. The 2nd Recordset pulls in Product Warnings and loops through those results. I need the 2nd to be nested inside each product. What I don't understand is how to pull in the current record so that the 2nd recordset knows which product it's on. EXAMPLE: Product 1 Warning 1 Product2 no warning Product 3 Warning 1 Warning 3 Warning 7 |
|
#2
|
|||
|
|||
|
Why don't you just return all of the data in a single recordset:
Product1 Warning1 Product2 NULL Product3 Warning1 Product3 Warning3 Product3 Warning7 This would be simple to do with a left join. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Nested recordsets - Pulling in current record |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|