Copy TMsQuery to TVirtualTable

Copy TMsQuery to TVirtualTable

Postby thalesm » Tue 26 May 2015 19:40

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.
thalesm
 
Posts: 1
Joined: Tue 26 May 2015 19:26

Re: Copy TMsQuery to TVirtualTable

Postby AlexP » Wed 27 May 2015 08:33

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.
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35


Return to VirtualDAC