RecordsetType Property Example

This example uses the Data control to create a Recordset object and examines the Data control's RecordsetType property to determine what type of recordset was created.

Sub DisplayRecordsetType()
' Indicate type of Recordset wanted.
Data1.RecordsetType = vbRSTypeDynaset
Data1.DatabaseName = "BIBLIO.MDB"
Data1.RecordSource = "Authors"
Data1.Refresh

Select Case Data1.RecordsetType
   Case vbRSTypeTable 
      Debug.print "Table-type Recordset created."
   Case vbRSTypeDynaset 
      Debug.print "Dynaset-type Recordset created."
   Case vbRSTypeSnapshot 
      Debug.print "Snapshot-type Recordset created."
End Select
End Sub