SQL Object
 
Syntax
 
SQL.SearchWithQuery[$](Query[, AltCaption][, ReturnColumn][, ExtraItem])
 
Description
Performs a search using a SELECT query, displaying the result in a standard TRADIUM dialog box and returning the selected item as a string. Here the entire row or a specific column can be specified. Optionally, multiple items can be added at the bottom of the SELECT query result.
 
Parameter
Description
Query
The complete SELECT query, including named column specifications.
AltCaption
Optional. Replaces the default title text in the dialog box.
ReturnColumn
Optional. If not specified or value -1: the entire row is reported back, using Chr$(9) (tab character) as the field separator.
ExtraItem
Optional. Additional lines to be added at the bottom of the list. Lines are separated by a CR/LF string and fields are separated by the TAB character.
Notice: The number of fields should match the number of fields in the SELECT query.
 
See Also
other SQL.Searchxxxxxxxx functions, SearchWithQueryArray.
Example
 
Sub Main
 
   Dim sResult As String
   Dim sQuery As String
 
   sQuery = "SELECT Admin, Code, Omschrijving FROM Prm_BTW WHERE Admin = "  _
            & SQL.AdminCode
 
   sResult = SQL.SearchWithQuery(sQuery , "BTW overzicht:" , 1, _
                                 "1" & vbTab & "<geen>" & vbTab & "geen btw")
 
End Sub