Dataset populated manually

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
piopio1
Posts: 32
Joined: Thu 10 Jan 2013 23:13

Dataset populated manually

Post by piopio1 » Sat 13 Jul 2013 18:14

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

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

Re: Dataset populated manually

Post by AlexP » Mon 15 Jul 2013 09:54

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.

Post Reply