PdcDBQuery.SetParamBool
Declaration
SetParamBool(ParameterName as string, Value as boolean) as boolean
Description
Changes the value of the parameter with a specific name to 'Value'.
Notes
This method will move the record pointer to the previous record in the created query. The result returns it was succesfull or not.
Code example
This code example executes a SQL statement with parameters.
Sub sExecuteQuery
dim objQuery
set objQuery = pdc.Database.OpenQuery(pdcConData)
objQuery.SQL = "SELECT * FROM LK_KLANT WHERE KL_PLAATS=:ParamOne AND KL_VINK1=:ParamTwo"
objQuery.SetParamStr "ParamOne", "Amsterdam"
objQuery.SetParamBool "ParamTwo", True
if objQuery.Execute then
msgbox objQuery.GetField("KL_NAAM")
else
msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & objQuery.SQL
end if
End Sub
Availability
Available since May 2019 (from version 5.5)