>>But why IN report? You said You have no DataEnvironment & no Private DataSession for report. Just add it before REPORT FORM...
>
>I'm sorry, I didn't explain very well, but for certains reasons, I need that the cursor get created and destroyed in the report.
>In the main code I only have REPORT FORM... with no table or cursor opened.
>So I need a DataEnvironment ?
>
>Thanks Borislav.
I just test it with VFP 9 beta.
View DataEnvironment in report. Select Properties
In Init event of the DE put SQLCOLUMNS(....)
In Destroy event of the DE put USE IN ...
***** UPDATE
But If Your sqlhandler (connection with SQL Server is broken) is invalid during the initialization of report I don't know what to do :o)))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.