PdcDBQuery.GetBlobToFile: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Methods ==
== Declaration ==
[[PdcDBQuery.AffectedRows]]<br />
GetField(FieldName as String) as Variant
[[PdcDBQuery.Execute]]<br />
[[PdcDBQuery.FirstRecord]]<br />
[[PdcDBQuery.GetField]]<br />
[[PdcDBQuery.LastAutoIncValue]]<br />
[[PdcDBQuery.LastRecord]]<br />
[[PdcDBQuery.NextRecord]]<br />
[[PdcDBQuery.PriorRecord]]<br />
[[PdcDBQuery.RecordCount]]<br />
[[PdcDBQuery.SetParamBool]]<br />
[[PdcDBQuery.SetParamStr]]<br />


== Properties ==
== Description ==
[[PdcDBQuery.BoF]]<br />
Returns the value of the supplied fieldname for the current record
[[PdcDBQuery.EoF]]<br />
[[PdcDBQuery.FieldNames]]<br />
[[PdcDBQuery.SQL]]


== Notes ==
== Notes ==
This property represents the query object. It makes it possible to execute SQL-statements on the database.
This method will return a field from a record.


== Availability ==  
== Code example ==
This code example executes a SQL statement and returns the customer name of the first record.
 
<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
    msgbox objQuery.GetField("KL_NAAM")
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub
</source>
 
== Availability ==
Available since September 2008 (from version 3.8)
Available since September 2008 (from version 3.8)

Revision as of 16:15, 14 January 2021

Declaration

GetField(FieldName as String) as Variant

Description

Returns the value of the supplied fieldname for the current record

Notes

This method will return a field from a record.

Code example

This code example executes a SQL statement and returns the customer name of 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
    msgbox objQuery.GetField("KL_NAAM")
  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)