Copy TMsQuery to TVirtualTable

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
thalesm
Posts: 1
Joined: Tue 26 May 2015 19:26

Copy TMsQuery to TVirtualTable

Post by 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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Copy TMsQuery to TVirtualTable

Post by 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.

Post Reply