Hi
I am having a RecordSet, RsSql, that I assign to the Reocrdset property of a MSHFlexGrid. Once this is done, I clsoe the recordset. When I try to query for another set of criteria, I first try to initialize the grid as below:
Arr_Grd_App contains info about the cell alignment, title of the column and so on.
When I try to initialize during requery, I got an error similar to the one below:
The object is disconnected from the client.
This error occured at GridApp.Rows = 0. This occurs sporadically.
I thought this might be due to the fact we are closing the recordset after assigning it to the grid and I tried to use a clone of the recordset for the assignment and it worked properly. But the doubt that came up was, what happens to all those cloned recordsets? Will they be lying in memory somewhere or will they be destoyed when I reassign a new cloned recordset to the RecordSet property of the grid?
Any suggestions would be most appreciated and sorry about the long post.
Thanks a lot.
I am having a RecordSet, RsSql, that I assign to the Reocrdset property of a MSHFlexGrid. Once this is done, I clsoe the recordset. When I try to query for another set of criteria, I first try to initialize the grid as below:
Code:
GridApp.Rows = 0
GridApp.Cols = 0
GridApp.Rows = 2
GridApp.Cols = UBound(Arr_Grd_App) + 1
When I try to initialize during requery, I got an error similar to the one below:
The object is disconnected from the client.
This error occured at GridApp.Rows = 0. This occurs sporadically.
I thought this might be due to the fact we are closing the recordset after assigning it to the grid and I tried to use a clone of the recordset for the assignment and it worked properly. But the doubt that came up was, what happens to all those cloned recordsets? Will they be lying in memory somewhere or will they be destoyed when I reassign a new cloned recordset to the RecordSet property of the grid?
Any suggestions would be most appreciated and sorry about the long post.
Thanks a lot.