Page 1 of 1

TVirtualTable.LoadFromDataset ?

Posted: Fri 15 Aug 2014 11:11
by GoSane
Is it possible to fill a virtualtable with the content of a TPgQuery ?

Thanks,

Re: TVirtualTable.LoadFromDataset ?

Posted: Mon 18 Aug 2014 07:42
by ViktorV
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

Re: TVirtualTable.LoadFromDataset ?

Posted: Mon 18 Aug 2014 09:57
by GoSane
Oops, sorry I missed it in the docs. Thanks !

Re: TVirtualTable.LoadFromDataset ?

Posted: Mon 18 Aug 2014 13:11
by ViktorV
Feel free to contact us if you have any further questions.

Re: TVirtualTable.LoadFromDataset ?

Posted: Tue 09 Mar 2021 09:24
by frickler
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.

Re: TVirtualTable.LoadFromDataset ?

Posted: Thu 11 Mar 2021 15:15
by MaximG
VirtualQuery cannot be linked to a specific data source, unlike ClientDataSet, which results in such behavior.