CreateRecordset メソッドの例 (VBScript)
この例では、サーバー側で Recordset を作成します。このレコードセットには、4 行から成る列が 2 つあります。
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