PdcDBQuery.FirstRecord: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == FirstRecord == Description == Moves the pointer to the first record == Notes == This method will set the record pointer to the first record in the created..."
 
No edit summary
 
Line 9: Line 9:


== Code example ==
== Code example ==
This code example executes a query and sets the pointer to the first record.


<source lang="vb">
<source lang="vb">
Sub sExecuteQuery
dim objQuery
dim intCnt


  set objQuery = pdc.Database.OpenQuery(pdcConData)
  objQuery.SQL = "SELECT * FROM LK_KLANT"
  if objQuery.Execute then
    objQuery.FirstRecord
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub
</source>
</source>


== Availability ==
== Availability ==
Available since September 2008 (from version 3.8)
Available since September 2008 (from version 3.8)

Latest revision as of 12:48, 31 July 2013

Declaration

FirstRecord

Description

Moves the pointer to the first record

Notes

This method will set the record pointer to the first record in the created query.

Code example

This code example executes a query and sets the pointer to the first record.

Sub sExecuteQuery
dim objQuery
dim intCnt

  set objQuery = pdc.Database.OpenQuery(pdcConData)
  objQuery.SQL = "SELECT * FROM LK_KLANT"

  if objQuery.Execute then
    objQuery.FirstRecord
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub

Availability

Available since September 2008 (from version 3.8)