PdcDBQuery.FieldNames: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 3: Line 3:


== Description ==
== Description ==
 
Returns the list of fieldnames for the supplied query.


== Notes ==
== Notes ==
Line 9: Line 9:


== Code example ==
== Code example ==
This code example returns the first fieldname of the query ("KL_NAAM").


<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
    msgbox objQuery.FieldNames(0)
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub
</source>
</source>


== Availability ==
== Availability ==

Latest revision as of 13:08, 31 July 2013

Declaration

FieldNames as IStrings

Description

Returns the list of fieldnames for the supplied query.

Notes

Code example

This code example returns the first fieldname of the query ("KL_NAAM").

Sub sExecuteQuery
dim objQuery
dim intCnt

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

  if objQuery.Execute then
    msgbox objQuery.FieldNames(0)
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub

Availability