News blog

What is Servoy?

Getting Started

Comparison Servoy/VFP




Code Reference


VFP2Servoy Toolkit



Contact / feedback















How to add a new table to an existing database

In the previous walkthrough Create a new PostgreSQL database/connection we created a Database Server connection and an empty database. Now lets add a new table:


  • Select the test Database Server entry (or whatever name you used)
  • In the List-View (the window which is in the lower left corner of the Design Perspective by default) press the button


A dialog opens asking you to enter the tablename:



  • Enter the tablename (in this example we used the name Customers)


A table entry is added to the List-View window:



And the table designer opens in the main editing area of the Servoy IDE:



As you can see a Primary Key has been added by default. Servoy will automatically fill the PK. If you prefer you can also let the database take care of this by using the databases native autoincrement types.


Note: ALLWAYS use a Primary Key in your table definition, Servoy simply needs it and will not function properly without it!!


  • Next, press the Add button and add columns just as you would in Visual FoxPro



You won't have any trouble with the field types because there are only five and they are self-explanatory:


  • TEXT


Servoy automatically converts these types to corresponding fieldtypes in the backend database. Of course if you want more control over which fieldtypes are used in the actual database you can consider using the Administrative DatabaseTools that are provided with the database.


For each column additional information can be specified regarding Format, Validation, Default values, Lookup values, Events, Calculations, Security etc. For detailed information on these topics please read the corresponding sections in the User Guide and/or Reference Guide.


After adding all columns close the table designer. The save dialog appears:



  • Click the Yes button



External resources:


vfp plugin


ServoyWorld 2012 pics


Official Servoy website


Ken Levy on Servoy


Servoy info


Servoy Forum


Servoy Documentation © 2010-2012 • All rights reserved • Contact: