Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to close a file
Message
From
06/10/2006 16:35:28
 
 
To
06/10/2006 16:31:48
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01160229
Message ID:
01160231
Views:
12
This message has been marked as the solution to the initial question of the thread.
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?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform