Page 1 of 1

Copy TMsQuery to TVirtualTable

Posted: Tue 26 May 2015 19:40
by thalesm
Hello,

I need to copy a TMsQuery dataset that is openned in dsInsert state to a TVirtualTable (or to another TMsQuery).

I tried using TVirtualTable.Assign(dsMsQuery), but when I do this, the state of the dsMsQuery is changed to dsBrowse.

Is there a way that I could clone a MsQuery dataset without changing its state? I cant change it after I copy the dataset.

Thanks in advance.

Re: Copy TMsQuery to TVirtualTable

Posted: Wed 27 May 2015 08:33
by AlexP
Hello,

To transfer data from DataSet to VirtualTable, we have to fetch all the records of the original DataSet. For this, we navigate to the first record of the original DataSet using the First method. When calling this method, DataSet switches to the dsBrowse state. It is standard behavior of DataSet - and we can't affect this.