How Do I Access an Existing Database Table? (Magic xpa 3.x)
If a database table already exists in the DBMS, it is a simple matter to bring it in to your Magic xpa application.
Prerequisite: You need to:
-
Have the DBMS installed and running,
-
Have the gateways for that DBMS installed
-
Have a database definition defined for that DBMS
These are covered in more depth in Make sure the gateways and DBMS are loaded and Set up the Database definition.
-
Select Options->Get Definition (F9). The Load Data Source Definition dialog box will open.
-
From the Database field, zoom to select your database.
-
From the Tag data sources field, select Several or All.
-
If you selected Several, zoom from the Data sources field to select which tables you want. For each table you want to bring in, position the cursor on the Select column and press the spacebar.
-
Click Select when you are done choosing tables. That will bring you back to the Load Data Source Definition dialog box.
-
Click OK. That will close the dialog, and the tables will appear in the Data repository.
Now you will have the definitions in Magic xpa.
Note: If the table has dates and times, you may get a message “Translate SQL Datetime columns to Magic xpa date & time field pair?”.