Do you have to close the connection? Why not close the rsCommand1_Grouping
You can set the connectionstring in the dataenviroment_initialize eventCode:if rsCommand1_Grouping.State = adStateOpen then rsCommand1_Grouping.Close DataEnvironment1.rsCommand1_Grouping.Open "SHAPE {select * from stock } AS Command1 COMPUTE Command1 BY 'stockgroup'" DataEnvironment1.rsCommand1_Grouping.Requery DataReport1.Show




Reply With Quote