18th Chapter-delphi Client Server application Development (II.) (2)

Source: Internet
Author: User
Tags continue dbase expression interbase odbc

BDE is designed to be object-oriented. At run time, the database application interacts with the BDE by establishing various types of BDE objects that are used to manipulate database entities such as database tables, queries. BDE's extended API supports access to the database engine for C, C + +, Delphi, and so on.

Accessing the database in the Delphi application is an API function that is BDE by tuning. Delphi provides approximately 30 API functions and various BDE messages and structures in the Library unit BDE. Since the development of Delphi applications is based on components, calls to the BDE API are embedded in the Delphi visual Part class library, so it is possible to build database applications without having to manage the BDE API details. As long as the IDAPI drivers is properly installed and properly configured, you can connect your database application to the server and access the database. Of course, in order to improve the application's database access performance, you can call the BDE API function directly in the program.

Borland's IDAPI includes support for ODBC, so with BDE, your application has access to all ODBC-compliant databases such as access and Btrieve.

Local InterBase server provides a single user multiple instance SQL Server platform, especially before transferring database applications to remote databases such as Oracle, Sybase, and Informix, in the local interbase The server platform builds and tests the database application.

SQL links plays a vital role in the Delphi database architecture for client/server-type database applications.

Borland SQL links supports BDE applications that access local (Paradox DBASE) and remote SQL databases. In order to access a specific remote SQL Server, the appropriate SQL links driver must be installed on the client. After the SQL links driver is installed, the SQL expression can be sent to the appropriate server for execution.

Once you have installed the SQL links driver and created an alias for the SQL driver, you can use the following methods to make the database application access the remote database like the local Paradox and dBASE databases:

Through the application user Interface (interface)

By using an application that contains embedded SQL expressions

Transferring SQL expressions directly to the server

BDE also supports applications using SQL to access local number sources.

The SQL links driver is installed, and you can access the data in SQL. The driver is responsible for the links to the SQL Server, converts the query statements into compatible SQL statements, and passes them to the SQL database. After processing is completed, the SQL database will result in

⑴bde customer query SQL database;

The ⑵sql links driver establishes a link between the client workstation and SQL Server and sends the query to SQL

Server

The ⑶sql server makes SQL expression errors and syntax checks, processes the query, and returns the results to the BDE

Customer

The ⑷sql links driver converts the results into a form that the client can recognize through SQL, which the client enters into

Line to format and display the data to the user.

Using SQL links drivers in your applications has the following benefits for databases that use SQL:

Ability to query SQL Servers directly

Support for the transfer of SQL networks

Enhanced fast access to records

Data locking

Bi-directional transformations in SQL result sets and database tables

Using indexes to sort data

Bookmarks the current session of the database, and can reuse bookmarks at a later time

Dynamically process SQL data through dynamic access to a data source

18.2 Delphi Client/Server application development environment construction

18.2.1 Borland SQL Links Installation

The SQL links installation process is as follows:

⑴ Insert the SQL LINKS1 disk into the floppy drive on the client workstation. A: or B.

⑵ in the Windows 95 Resource Manager, select Run A:\INSTALL (or B:\INSTALL) and display the Open dialog box.

⑶ Select Continue or press ENTER. INSTALL the BDE dynamic link library IDAPI01.DLL is installed on the detection workstation. If required, it will display a dialog box to allow you to describe the location of the file. When the IDAPI01.DLL is positioned, install displays the Borland SQL Links Directory dialog box, describing the SQL links driver you want to install.

When you have completed these tasks, select Continue or press Enter.install to display the Idapi Configuration locator box.

⑷ describes the location of the upgraded version of the IDAPI configuration file that you want to install. When you have completed these tasks, select Continue or press ENTER. Follow the driver you have chosen before continuing the installation. The installer will need more information, which will be described in the following sections.

⑸ Once you have provided all the necessary information, installation begins when the installation is complete, you can choose to view the SQL Links Readme file--readlink. Txt. Reading this file will find the latest information.

18.2.2 Configure SQL Environment

The BDE Configuration tool (BDECFG32) is installed with your BDE application. EXE), which helps users modify their application configuration. The configuration parameters are stored in a binary file named Idapi32.cfg. This file is read when the application is started. Typically, the file is placed in the BDE file directory (C:\Program Files\common\bde) during the application installation process.

This section describes how to use the BDE Configuration tool to set the SQL environment for your application. Once you have configured the BDE application environment, you can begin to join the network and access the SQL Server.

For more information on how to use the BDE Configuration tool, see the BDE User's Guide or the Select Help button on the Run BDE Configuration tool to display online assistance.

Before you start configuring your SQL environment, you must have done the following:

SQL links software installed

Quit all other Borland applications

Open Application Group in Windows 95 Borland Delphi 2.0

Select the IDAPI Configuration Tool icon to enter the driver management page after the Configuration work window appears

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.