Create the Interbase tables


Next, create the table structures. This can be achieved in several ways. The easiest way is to take a simple text file, fill in the table structure, and "import" the structure to InterBase using IBConsole, as explained below. There is a separate section covering "Importing database changes using a SQL file" which will be of interest when you need to carry out the Importing process for the second time.

A simple text file has been provided with this guide (Tables.SQL) with illustrative file layouts. Change the layout(s) to the layout(s) you require, and import the structure into InterBase. You can change it easily later. Those who don't feel comfortable with what they are doing might want to see Creating tables - Tips, prior to "doing it".

Do it!

To create the tables:

Open "Tables.SQL" in any text editor (eg. Notepad, Delphi)

Change the file location within the "Connect" statement to the location to which you saved the Database

Change the "user" and "password" to the username and password used to create the database

Change the Table layout to the layout you want. (Want help with Datatypes? See InterBase Datatypes)

Save the file (Latest changes not used by InterBase? See Creating tables - Tips )

In the program IBConsole, click "Query, Load script"

Find the SQL file you saved, and click "Open".

Click "Query, Execute"

If you want the confirmation and/or the error messages to appear in the IBConsole window, click the "No" button. If you prefer them to be saved to disc in a simple text file, click the "Yes" button and give the program a file name and location to which the results will be written.

If successful - you will be told (well done!). (Failure? See Handling SQL script errors)