"," ")
%>
|
<%
Response.Write(strTable)
%>
|
Filter a RecordSet
strSQL = "SELECT pub_id, title_id, title FROM titles ORDER BY pub_id, title"
Call SQLMultiQuery (strSQL, RecSet, Conn )
you will have a recordset with lots of pub_id
RecSet.Filter = "pub_id = '0736'"
now the recordset will just have pub_id's with the above value.
RecSet.Filter = adFilterNone ' constant from adovbs.inc ( = 0)
now we have the full recordset back again
Data Shaping
strConnect = "Provider=MSDataShape;data provider=msdasql;Data Source=DSN_NAME;uid=USER;pwd=PASSWD;"
Set rsEvents = Server.CreateObject("ADODB.RecordSet")
strSQL1 = "SELECT a,b,m FROM tblNameOne"
strSQL2 = "SELECT b,x,y FROM tblNameTwo"
strSQL3 = "SELECT c,y,z FROM tblNameThree"
queryStr = "SHAPE {" & strSQL1 & "} " & _
"APPEND(( SHAPE {" & strSQL2 & "} " & _
"APPEND ( {" & strSQL3 & "} " & _
"RELATE y To y) As rsY)" & _
"RELATE b To b ) As rsB"
rsEvents.Source = queryStr
rsEvents.ActiveConnection = strConnect
rsEvents.Open
While Not rsEvents.EOF
a = rsEvents.Fields.Item("appearanceOrder").Value
Set rsChild = rsEvents.Fields.Item("rsB").Value
While NOT rsChild.EOF
b = Trim(rsChild.Fields.Item("b").Value)
Set rsBaby = rsChild.Fields.Item("rsText").Value
While NOT rsBaby.EOF
c = rsBaby.Fields.Item("c").Value
rsBaby.MoveNext
Wend
rsChild.MoveNext
Wend
rsEvents.MoveNext
Wend
rsEvents.Close
|