Subject Re: Data module with a complex index
From Robbie Nott <>
Date Fri, 6 Dec 2019 22:36:09 +0200
Newsgroups dbase.getting-started

Hi Mervyn
Eskom is a disgrace !

Bought a 1000 Watt inverter at the Chinese flea market ( R500 )
When the power goes off I attach it to my car battery and my PC runs fine.
Not sure how long it'll last - have used it for 4 hours and the car
started just fine.

As for the Data module I'm battling with, please see my reply to Akshat
Am wanting to do the 2 key relationship in the data module and not sure
how to implement in the data module.

Many thanks

On 06/12/2019 11:52, Mervyn Bick wrote:
> On 06/12/2019 11:39, Robbie Nott wrote:
>> Hi Mervyn
>> Thanks for the reply
>> dBase 12
>> Attempting to learn the data modules.
>> 3 tables, Show, cat and ring
>> Many cats per show, many rings per cat
>> Show table has the ShowNo field.
>> Cat table has ShowNo and CatNo fields.
>> Ring table has ShowNo and Catno fields which are the
>>   fields used to filter the Ring records
>> Rings don't have a unique number, rather they are linked
>> by show and cat number.
>> Existing system creates a concatenated key of
>> Show["ShowNo"] + Cat["CatNo"] for restricting the ring records.
>> Ring table has a ShowCat index, and program uses a setRange().
>> Wanting to do a data module for this and not sure how to proceed.
>> Perhaps a calculated virtual field in the Cat table ?
> I'm afraid this has to be very short.  The power is due to go off in 15
> minutes.  (It was off last night from 20:00 and although it was due to
> come back on at 23:00 it only came back on at about 07:00 this morning.)
> A datamodule is just a container for queries.  This makes it easy to use
> the same query in different forms and reports without having to craft
> (or copy) the same SQL statement over and over.
> You can place exactly the same query you used before in the datamodule.
> When you drag the datamodule onto a form instead of referring to the
> query as form.queryname you refer to it as form.datamodulename.queryname
> When (if :-) ) the power comes back on I'll add to this.
> Mervyn.