-
Notifications
You must be signed in to change notification settings - Fork 1
NTFormsFillComboFromPGSQL
amaneiro edited this page Jan 24, 2012
·
4 revisions
The alias and the value is expected to be stored in the same table. It's an usual configuration, for example, having specific tables where defining pairs alias/value.
<FIELD>
<FIELDNAME>gestion</FIELDNAME> <!-- field to fill with domain values -->
<DOMAINREADER>
<DRTYPE>db</DRTYPE> <!-- domainreader is a databasereader -->
<DRDBTABLE>yourtable</DRDBTABLE> <!-- table in database -->
<DRDBCOLUMNALIAS>youralias</DRDBCOLUMNALIAS> <!-- what will be shown in the combo -->
<DRDBCOLUMNVALUE>yourvalue</DRDBCOLUMNVALUE> <!-- key stored/retrieved from datasource -->
</DOMAINREADER>
</FIELD>
Your extension should depends on extDBConnection, a gvsig plugin which easy the task of manage the connection to a database.
Before launching the form, you should connect to the database by means of extDBConnection utilities.