This code example creates a Recordset on the server side. It has two columns with four rows each.
<!-- BeginCreateRecordsetVBS --> <%@ Language=VBScript %> <html> <head> <meta name="VI60_DefaultClientScript" content=VBScript> <meta name="GENERATOR" content="Microsoft Visual Studio 6.0"> <title>CreateRecordset Method Example (VBScript)</title> <style> <!-- body { font-family: 'Verdana','Arial','Helvetica',sans-serif; BACKGROUND-COLOR:white; COLOR:black; } .thead { background-color: #008080; font-family: 'Verdana','Arial','Helvetica',sans-serif; font-size: x-small; color: white; } .thead2 { background-color: #800000; font-family: 'Verdana','Arial','Helvetica',sans-serif; font-size: x-small; color: white; } .tbody { text-align: center; background-color: #f7efde; font-family: 'Verdana','Arial','Helvetica',sans-serif; font-size: x-small; } --> </style> </head> <body> <h1>CreateRecordset Method Example (VBScript)</h1> <% Sub CreateARecordSet Dim ColInfo(1), c0(3), c1(3) c0(0) = "Name" ' Column name. c0(1) = CInt(129) ' Column type (129 = adChar). c0(2) = CInt(40) ' Column size. c0(3) = False ' Is the column nullable? c1(0) = "Age" ' Column name. c1(1) = CInt(3) ' Column type (3 = adInteger). c1(2) = CInt(-1) ' Column size. c1(3) = True ' Is the column nullable? ' Add the columns to the recordset definition. ColInfo(0) = c0 ColInfo(1) = c1 ADC1.SourceRecordset = ADF1.CreateRecordset(ColInfo) End Sub %> </body> </html> <!-- EndCreateRecordsetVBS -->
CreateRecordset Method (RDS) | Recordset Object