VDatabase In an RB Module

jda jda at his.com
Thu Sep 29 14:35:32 CDT 2005


>Some of it is pretty straight forward.
>
>[1] Create the module.
>[2] Set up the properties of the database and table(s).

My advice is to create a record with generic properties:

integerField
booleanField
textField
etc. (more than one of the same type if needed).

Have one field called 'propertyName' (or whatever).

Then create a record for each property you want to install and use 
the appropriate field to store the value. For example, to store a 
boolean for showing/hiding a palette, you might create a record where

propertyName = 'showPallete'

and

booleanField = true/false

When you want to fetch the preference value, do an sql search for a 
record WHERE propertyName = 'showPalette' and retrieve booleanField.

This way you can add or remove preferences without having to change 
the schema for the db (which only causes headaches when you upgrade 
your product).

Jon


More information about the Valentina mailing list