Share via


QueryAllRecords method

Returns all the records (matched, unmatched, and skipped) in a data set as a Recordset object. Allows you to browse the returned records. Returns an error for DataSet objects with a HowCreated property of geoDataSetDemographic.

Applies to

Objects: DataSet

Syntax

object.QueryAllRecords

Parameters

Part

Description

object

Required. An expression that returns a DataSet object.

Example

Sub GetAllRecordsOnMap()

Dim objApp As New MapPoint.Application
Dim objDataSet As MapPoint.DataSet
Dim objRecordset As MapPoint.Recordset
Dim objField As MapPoint.Field
objApp.Visible = True
objApp.UserControl = True
Set objDataSet = objApp.OpenMap(objApp.Path & "\Samples\Clients.ptm").DataSets("Clients")

'Retrieve all records
Set objRecordset = objDataSet.QueryAllRecords

'Get the values
Dim vals As String
objRecordset.MoveFirst
Do Until objRecordset.EOF
For Each objField In objRecordset.Fields
vals = vals & CStr(objField.Value) & vbTab
Next objField
vals = vals & vbCrLf
objRecordset.MoveNext
Loop
MsgBox vals

End Sub