[Return to contents]
Last updated: 24 Sep 2010
On page 8-51 of 'Developing SmartSuite Applications Using LotusScript' there is an example of embedding SQL SELECT statements in a Script.
Other example LotusScripts using SQL can be found in the Approach User Support Example Databases for Lotus Approach web page:
Using SQL SELECT statements in scripts means that you can use values obtained from the user in the select statement without having to create new queries each time.
Sub GetItem(FindItem as String)
'the ITEM_NO the user is looking for gets passed to the sub
' the line we're focusing on in the SELECT statement would
' look something like this:
FROM "C:\lotus\work\approach\invoice97.dbf" invoice97
WHERE (invoice97.ITEM_NO = FindItem)
ORDER BY invoice97.PERIOD,invoice97.WEEK