Below is an example of a browse screen for SQL backends. The code
is generic to any SQL server.

Code example from Search Button
free(q); loc:bar=0; loc:recs=0; display
case loc:order
of 'Grantor'
loc:sql='select * from qpba where grantor like ''' |
& clip(loc:search)&''''
of 'Grantee'
loc:sql='select * from qpba where grantee like ''' |
& clip(loc:search)&''''
end
sQpba{PROP:SQL}=loc:sql
loop
next(sqpba)
if errorcode() then break.
q:grantor=sqpba:grantor
q:grantee=sqpba:grantee
q:pdesc=sqpba:pdesc
add(q)
loc:bar+=1
if records(q)=1 then loc:sql=sqpba{prop:sql}; display(?loc:sql).
display(?loc:bar)
end
loc:recs=records(q)
display