Linking Databases in a Client-Server Environment

DataEase can be used as a front-end tool (i.e. the client) in a Client-server environment.

In a Client-server environment, each workstation receiving data is an intelligent machine capable of processing data in numerous ways, such as calculating or evaluating the data.

 

Structured Query Language (SQL) is used as a common intermediary language in the Client-server environment, making it possible for desktop applications (like those you create with DataEase) to manipulate mainframe, minicomputer, and local PC databases.

 

The advantages of adopting Client-server architecture include reduced costs for processors, network, application development, and maintenance. Improved performance by dividing labor between the client and server processors, and higher productivity through the use of user-friendly client tools.

DataEase lets you link an SQL database or a foreign database (such as dBASE and Paradox) to your application. A foreign database is created in a database management system other than DataEase.

Each database may be accessed by workstations running DataEase, by workstations running other front-end products, and, in some cases, by terminals connected to a central processor.

Be aware of other systems that add or change data in the databases your application accesses. You must not violate established procedures for inserting or updating data in an external database.

 

SQL Database Link Requirements

Before you can link an SQL database to your application you must:

 

Linking a DataEase Application to an External Database

When you choose Application>>Database Links, DataEase opens the Database Links dialog. This dialog lets you link your application to an external database on a database server to which your computer is physically connected.

Note: When you choose a server, DataEase will prompt you to enter a valid Login Name that gives you access to the data that you require on that server.

 

image\dg8-28.gif

 

Database Links Dialog Options

Link Name lets you assign a name to the database. The Link Name is used to refer to the database from within your application. The same Link Name is shared by all DataEase workstations that use the application. You may want to use the actual database name as specified on the server, or a more descriptive name. After you enter the Link Name, DataEase automatically enters that name in the Database Name text box.

When you link a database to your application, DataEase stores its name in the application. Since DataEase does not have to log on to the server to generate this information, the names of all linked database tables are displayed quickly in the dialog.

 

Tip: If databases on two servers use the same name, use Link Name to assign different names for use within your application.

 

Engine Type tells DataEase the type of engine that stores the database you want to link to your application. When you click on the Engine Type drop-down arrow, DataEase lists all the engine types (e.g. SQL Server, Oracle, ODBC, etc).

 

Note: If you are using an ODBC (Open Database Connectivity) driver to link to a foreign database (such as dBASE or Access), you must use the ODBC Administrator tools to set up your ODBC data sources before you can create a DataEase database link. See your ODBC documentation for further instructions.

 

Server Name tells DataEase the name of the server that stores the database you want to link to your application.

If you are linking to an SQL database, enter the name of the server that stores or accesses the database. The server is the computer running the specified database engine software.

For example, Club ParaDEASE's Sales and Reservations staff uses data stored on a minicomputer, which is recognized on the network as the Finance server. Club developers specify Finance as the server for DataEase.

Database Name tells DataEase the name of an existing database you want to link to your application. Enter the name of a database that exists on the specified server.

Tables Available lists all tables that you can access in a linked database. To view the list for a database link, double-click on the Link Name.

 

image\dg8-30.gif

 

Default Link automatically displays the name of the default database that is associated with the application. To change the default database, choose File>>New>>Form, or File>>New>>Report, to display the New Document dialog. Change the database in the Database box on the lower right of the New Document dialog.

Add saves the link from a DataEase application to the external database you specify using the controls located above the buttons in the dialog.

When you add a new database link, DataEase displays the following messages:

Loading Database Engine Driver…

Logging on to the server Server Name…

Opening the database Database Name…

…where Database Engine, Server Name, and Database Name are the actual values from your system.

When you add a link, DataEase automatically lists the tables in the specified database in the Tables Available box.

Build Forms lets you select multiple tables at one time to use with your application. Select from the Tables Available list. This is faster than selecting tables one at a time using the New Document dialog.

Refresh updates the list of tables and synchronizes each DataEase table with the SQL table definition on the server. You must refresh the database link if any table is modified by another front-end product, or another DataEase application.

To refresh a database, double-click on the Link Name and click Refresh. When DataEase displays an Alert message, click OK.

Rename lets you change the Link name of an external database. When you click Rename, DataEase displays the Rename Database Link dialog. All documents using the original link will be connected to the new Link Name you specify.

 

Rename Database Link Dialog Options

Rename Connection displays the name of the database link to be renamed.

To tells DataEase the new name you choose for the link. Enter the new name.

Delete removes a database link from your application. To delete a database link, double-click on the Link Name and click Delete.

Done closes the Database Link dialog.

 

Note: Any documents that use tables based on a deleted link will be orphaned and not usable. Therefore you should not delete a link if documents may later need to use the linked database tables.

 

How to Link a DataEase Application to an External Database

  1. Choose Application>>Database Links, and DataEase opens the Database Links dialog.

  2. In the Link Name text box, enter the name by which you want to refer to the database from within your application.

  3. When you click on the Engine Type drop-down arrow, DataEase lists the supported engine types. Choose the appropriate Engine Type - Oracle, ODBC, SQL Server, or whatever.

  4. Before you enter the name of the server, you must know the name of the server that stores or accesses the database. You must also know the name of the database, and have a valid Login Name. Enter the name of the server (e.g. ServerA1) in the Server name text box. Enter the Login Name when DataEase prompts you.

  5. Click the Database Name text box and enter the name of a database that exists on the specified server.

  6. To be sure you specify the right database, scroll through the table names available in the database, as listed in the Tables Available list box.