SQL Object
 
Syntax
 
SQL.RunQueryGet1Field(Query[, TimeOut])
 
Description
Performs a SELECT query and returns the first field from the first line of the result.
 
This function is optimized for retrieving single-value queries; Even if a query has multiple fields and/or lines, only the first line is retrieved and the leftmost column is reported back.
 
Parameter
Description
Query
A reference to a SELECT query.
Timeout
Optional. The number of seconds in which the test must be completed. If not specified, the timeout is 30 seconds.
 
See Also
other SQL.RunQueryxxxxxxxx functions.
Example
Sub Main()
 
    Dim sQuery As String
 
    sQuery = "Select Max(Tarief) From Prm_BTW"
 
    Debug.Print "Hoogste btwtarief:" & SQL.RunQueryGet1Field(sQuery)
 
End Sub