Clicking on the
Data/Join Database menu item allows to temporarily attach a database table to the attribute table of a vector layer. The Editor sets up a persistent linkage to a database, without importing the table into the layer. When the connection has established the columns from the database are displayed in the Data panel along with the layer attributes. The attributes stored in the database are easily distinguishable by the db. prefix in the column names. The database columns cannot be edited from the Editor, but they are dynamically updated whenever the values are changed within the database.
To attach a database table to the attribute table of a vector layer
Data/Join Databasemenu item - this invokes the
Join Databasedialog box.
Join Databasedialog box, enter the connection string in the
Connection stringfield or click on the
Build…button to use an automated method. Clicking on the
Build…button invokes the
Connection stringdialog box. If a file with connection parameters is available check the
Use data link fileoption, click on the
Browse…button and point to the file. Otherwise check the
Use connection stringoption, click on the
Build…button and use the
Data link propertiesdialog box define the connection according to the configuration of your database. Finally, click on the
OKbutton to close the
Connection stringdialog box.
Join Databasedialog box is filled with information about available database tables.
Tablelist - this table will be attached to the attribute table.
Order bylist - this column will be used to sort the records of the table.
Previewbutton - this causes refresh of the
Data previewfield which presents the database content selected by the SQL query.
Assign bybox use the
Layer attributeand the
Database columnlists to define how the records from the database should be assigned to the shapes.
Joinbutton - the selected database content will be attached to the attribute table of the layer.