Function CallMe (part of our standard procedure) >Parameter tcEmpno >Local lnDS, lnNewDS, lcCallMe > ><b>lnDS = set('datasession') >lnNewDS = createobject('session') >set datasession to lnNewDS.datasessionid</b> > >select 0 >use people order empno >seek tcEmpno >if found() > lcCallMe=iif(empty(termdate),'','*')+trim(callname)+' '+empname >else > lcCallMe='' >endif > ><b>release lnNewDS >set datasession to (lnDS)</b> > >return lcCallMe>
LOOKUP()
, but one of your problems here may be that SET EXCLUSIVE
is scoped to the DataSession (see the help under SET DATASESSION
for a full list of commands.loNewDS
, btw?)SELECT 0 USE people SHARED IF SEEK(tcEmpNo, "people", "empNo") *!* etc.