Page 1 of 1

Dataset populated manually

Posted: Sat 13 Jul 2013 18:14
by piopio1
Hello,

Is it possible to populate TPGTable and TPGQuery by pulling data in a VirtualTable fashion and not by retrieving data from a PostgreSQL DB ?

The goal is to create one or more mock datasets with not connection to PostgreSQL and suitable for unit testing with DUnit.

Many thanks
Pio Pio

Re: Dataset populated manually

Posted: Mon 15 Jul 2013 09:54
by AlexP
Hello,

You can just enter data into VirtualTable both in run-time and design-time without using any other data sources. In design-time, this can be done with the help of the visual VirtualTable data editor. In run-time, this can be done using the Insert/Post methods. Besides, in design-time you can load data from any DataSet, using the context menu VirtualTаble > Assign DataSet, or from file. When entering data manually, or using the Insert/Post methods, VirtualTable must contain the corresponding fields.