PdcDBQuery.AffectedRows

From External Bemet Wiki
Revision as of 20:15, 11 September 2017 by Arjan (talk | contribs) (Created page with "== Declaration == AffectedRows as VT_INT == Description == Returns the number of records that are affected by the query == Notes == This method returns the number of recor...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

AffectedRows as VT_INT

Description

Returns the number of records that are affected by the query

Notes

This method returns the number of records that are affected by the query .

Code example

This code example executes a SQL statement and returns the AffectRows.

Sub sExecuteQuery
dim objQuery
dim intCnt

  set objQuery = pdc.Database.OpenQuery(pdcConData)
  objQuery.SQL = "UPDATE LK_KLANT SET KL_USER1 = 'update' WHERE KL_PLAATS = 'Veenendaal'"

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

Availability

Available since September 2017(from version 5.3)