Detailed description of C ++ Builder Database Program Design and Development

Source: Internet
Author: User
Development Environment used: C ++ Builder 5.0 Article 1: Relationship between BCB and databases

Many people develop database applications with a vague concept, that is, what is the foreground and what is the background. In fact, BCB is used to develop database applications to operate databases through data links! The data link here refers to a unified database operation interface provided by the operating system or BCB! For example, ODBC, ADO, and BDE! Our database applications use user interfaces to perform input or output operations to control backend databases through ado, ODBC, and BDE (such as insert, delete, and modify, query ).

Article 2: BCB database development components and tools

To develop database applications, we recommend that you master the following tools and components:

1. Data Access Components and data awareness components

There are more than 20 of these two types of components. The Data Access Component determines the type, open mode, and status of the database to access. The data perception component can select different functional components based on the data type in the database to access the data in the database.

2. Data Report component

The data report component is mainly used for output reports. If you do not need to output reports, these components are not available. BCB has its own Quickreport, but in my opinion this report component is not very useful. In this case, you need to use a third-party report component, such as fastreport. The report design in the future will all adopt the fastreport component!

3. BDE Manager

BDE Manager (Administrator) is a database engine management tool of Borland. It can set BDE aliases and paths, database language driver engines (such as Chinese drivers), and supported database types and versions.

4. Database Desktop

The Database Desktop is a database maintenance application. Similar to a small FOXBASE, you can create, delete, and compress databases, and modify the database structure and indexes, you can copy data from one database to another.

In the above four types of components or tools, BDE administrator is a database application support environment. Without it, database applications cannot run (BDE-based database applications ). The Database Desktop function can be implemented through User Programming and using components.

Article 3: how to install database tools and Instances

To use the database functions of C ++ builder, pay attention to the following settings when installing C ++ builder:

1. select Custom mode for Installation

You should know that this option is selected when the installation program selects the installation mode.

2. Select database tools

After selecting the custom installation mode, click Next:

Select Database Desktop to install the Database Desktop tool;

Select borland database engine to install borland database driver engine (BDE );

Select SQL links to install various database support for SQL;

Select shared files to install some shared data of Borland products.

After the installation is complete, the development environment of the database application is ready. Next, let's start with how to create and use database applications.

Article 4: How to use ADO Components

I chat with my friends online and at ordinary times. They seem to have opinions on the BDE component. In this case, we will not discuss how to use BDE. In fact, from my personal point of view, BDE also has an outstanding aspect. In terms of functionality and performance, it can be said that it is not inferior to ADO and has existed. However, some people do not like the BDE component very much, so let's skip it and talk about ADO.

ADO is called ActiveX Data Object. You may use the ADO component to access data. ADO provides an Advanced Interface for a large number of data through the Microsoft oledb data access technology. Oledb is an interface of Microsoft's data access system. Oledb is an open technical system that inherits the ODBC proposed by Microsoft earlier. It aims to provide a database interface that can access databases across platforms. Oledb data access technology allows users to quickly access any data source, including relational and non-relational databases, e-mail and file systems, text and images, and user-defined business objects.

The ADO component uses ADO technology to access data through existing data control components such as DBGrid and dbedit. Borland database engine (BDE) is not required ). However, the ADO/oledb Runtime Library must be installed. ADO is pre-installed in Windows 2003, XP, And. In other versions earlier than 98, ADO must be separately installed using Microsoft Data Access Components (MDAC, this can be obtained through Microsoft's website for free. Like ODBC drivers, ADO drivers can also access Special Data Warehouses. providres and ODBC drivers are different for different data warehouses and must be installed separately.

The use of ADO components is very easy and efficient, and more importantly, it only uses a very small number of system resources. In addition, the ADO component allows users to use various database system resources, strong storage procedures, batch update, cursors, and support for multiple recordsets.

Over bcb5, seven ADO components are provided, which are:

Main functions

Adoconnection is used to establish a permanent connection to the ADO database and supports the transaction function.

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.