>>Don, this will leave both, the table and the database open
>
>Thanks Hugo.
>I don't mind leaving the database open but I would like to close the table unless it was already open when the function was run. How would you test to see if the table was already open if you don't know what alias it may be using? And how would you close it?
>
>
>function GetERName
>lparameters lnER
>select name from newbluebook!ers where er_id = lnER into array aERName
>if type('aERName')='C'
> return aERName
>else
> return ''
>endif
>
Check
http://www.levelextreme.com/wconnect/wc.dll?2,84,14,31943