>>>>But the problem is that there is running MS Access program, which requires a lot of memory on the same server, but it runs fast, while VFP programs running slower and slower until server restarts...
>>>
>>>The scenario you describe, clearly indicates that you have some dangling references in your VFP program. See
http://fox.wikis.com/wc.dll?Wiki~OOP,GarbagecollectionAndDanglingObjectReferences...~VFP>>
>>Thanks for good link...
>>I think I know where is the problem:
>>My VFP program uses MS Excel to produce reports:
>>
>>LOCAL objXlsApp, objXlsSheet
>>
>>objXlsApp = CreateObject("Excel.Application")
>>objXlsApp.Workbooks.Open("C:\Template.xls", .T., .T.)
>>objXlsSheet = objXlsApp.Workbooks("Template.xls").WorkSheets("Sheet1")
>>objXlsSheet.Range("A1").Value = "Test"
>>objXlsApp.Workbooks("Template.xls").SaveAs("C:\Report.xls")
>>objXlsApp.Application.Visible = .T.
>>
>>
>>Can it cause the problem?
>>Will it help if I includes this code in the end?:
>>
>>RELEASE objXlsApp, objXlsSheet
>>
>Yes, it will help! To be 100% safe, you should assign .null. to the variables before releasing them
>objXlsSheet=.null.
>objXlsApp=.null.
>Release objXlsApp
>Release objXlsSheet
NB! UT does not support < code >, you must use < pre >