TVirtualTable.LoadFromDataset ?

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
GoSane
Posts: 4
Joined: Fri 15 Aug 2014 10:46

TVirtualTable.LoadFromDataset ?

Post by GoSane » Fri 15 Aug 2014 11:11

Is it possible to fill a virtualtable with the content of a TPgQuery ?

Thanks,

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TVirtualTable.LoadFromDataset ?

Post by ViktorV » Mon 18 Aug 2014 07:42

You can read on how to fill TVirtualTable with data from TPgQuery in the VirtualTable help: https://www.devart.com/vtable/docs/tvir ... assign.htm

GoSane
Posts: 4
Joined: Fri 15 Aug 2014 10:46

Re: TVirtualTable.LoadFromDataset ?

Post by GoSane » Mon 18 Aug 2014 09:57

Oops, sorry I missed it in the docs. Thanks !

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TVirtualTable.LoadFromDataset ?

Post by ViktorV » Mon 18 Aug 2014 13:11

Feel free to contact us if you have any further questions.

frickler
Posts: 37
Joined: Wed 04 Apr 2018 08:30

Re: TVirtualTable.LoadFromDataset ?

Post by frickler » Tue 09 Mar 2021 09:24

https://www.devart.com/virtualdac/docs/ ... bject).htm

You may set Query1.Options.SetFieldsReadOnly to false in order to edit fields in the virtual table, that are calculated fields in the query. For example:

Code: Select all

Query1.Options.SetFieldsReadOnly := false;
Query1.SQL.Text := 'SELECT foo, true AS yes FROM bar';
Query1.Open;
VTable1.Assign(Query1);
VTable1.Open;   // <= in contrast to the clientdataset you have to open the virtual table explicitly
Here you can edit the "yes" field in order to mark it as to be changed later in some database source table or so.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: TVirtualTable.LoadFromDataset ?

Post by MaximG » Thu 11 Mar 2021 15:15

VirtualQuery cannot be linked to a specific data source, unlike ClientDataSet, which results in such behavior.

Post Reply