Thanks Craig, I'll give it a try.
>I've made it a habit to never have a SQL statement open the tables. I always explicitly do it. To fix the problem, put the following line of code anyplace after the SELECT statement.
>
>USE IN rtadrawdowns
>
>
>>The following code is contained in a CON dll which is accessed via a web page.
>>
>>
>>function GetLastDrawdown(lcRTA_id)
>>select * ,;
>> dtoc(fromdate) as fdate, ;
>> dtoc(todate) as tdate ;
>> from rta!rtadrawdowns ;
>> where rta_id == lcRTA_id ;
>> order by subdate ;
>> into cursor crsDrawdown
>>go bott
>>scatter name loDrawdown memo
>>use in crsDrawdown
>>return loDrawdown
>>endfunc
>>
>>
>>It seems that after the function is accessed, the rtadrawdowns table remains open even though the code closes the cursor. Perhaps this is because the object retains a reference to it??
>>
>>It seems to still be open because subsequent attempts to modi stru of the table meet with a file access denied error. How can I insure the table is closed so I can modify it?