C ++ Builder database program design development detailed

xiaoxiao2021-03-06  53

Today is December 6, 2004, starting today, my blog will publish my application experience and detailed development guidance in the BCB database development process.

Development environment: C Builder 5.0

First: the relationship between BCB and database

Many people develop database applications There is a conceptual blurry problem, that is, what is the front desk, what is a background. In fact, BCB develops database applications, which is the function provided by BCB, and operates databases through data links! The data link here refers to an operating system or a unified interface for database operations! For example,: ODBC, ADO, BDE, etc! Our database applications are for input or output by the user interface to achieve control (insert, delete, modification, query, etc.) for the background database through ADO or ODBC, BDE.

Second: Components and tools for BCB development database

To develop database applications, it is recommended to grasp the following tools and components:

1. Data Access Components and Data Perception Components

These two types of components have approximately 20 more. Data Access Components determine the type of access to the database, open mode, and database status; data-sensing components can use the data types in the database to select data from different components to access data.

2, data report components

Data report components are mainly used for output reports. If users do not need to output reports, such components can not be mastered. BCB has QuickReport, but this group of report components is not very useful as personal opinions. At this time, you need to use third-party report components, such as FastReport. After the report is reported in the future, all use FastReport components!

3, BDE Manager

BDE Manager (Administrator) is Borland's database engine management tool. It can set the BDE alias and path, set the database language drive engine (such as a Chinese drive engine), set information, and the information such as the supported database type and version.

4, database desktop

Database Desktop is a database maintenance application, similar to a small FoxBase, you can create, delete, and compress the database, you can modify the structure and index of the database, you can copy data from one database to another.

In the four-class components or tools, BDE Administrator is a database application support environment. If it doesn't, database applications cannot run (BDE-based database applications). The functionality of the database desktop can be implemented by the user yourself and use components.

Article 3: How to install database tools and instances

In order to be able to use the C Builder database function, please pay attention to the following settings when installing C Builder:

1, choose the Custom mode installation

This is not to say, everyone should know, that is, when the installer is selected to select the installation mode, select this.

2, select the database tool

When the Custom installation mode is selected, click Next:

Select the Database Desktop installation database desktop system tool;

Select Borland Database Engine to install Borland Database Drive Engine (BDE);

Select SQL Links to install various database support for SQL;

Select some shared data from Shared Files to install Borland products. After this is installed, it has the development environment of the database application. Next: We start how to create and use database applications. Article 4: How to use ADO components I am online and in us with friends, they seem to have comments on the BDE component. In this case, we don't talk about the use of BDE. In fact, from my personal point of view, BDE also has its excellent aspect, and it can be said that it is not bad in ADO from functional and performance, and it has been. However, some people don't like BDE components, then we will slightly, they will say ADO. ADO is a full name: ActiveX Data Object. Users may access data through the ADO component. ADO provides a high-level interface for many data through Microsoft OLEDB data access technology. OLEDB is an interface for system-accessed data accessed by Microsoft. OLEDB is an open technical system that inherits Microsoft's earlier ODBC, with an object of providing a database interface that can access the database across platforms. OLEDB data access technology allows users to quickly access any data sources, including relational databases, and non-relational databases, email, and file systems, text, and images, and user-defined commercial objects. The ADO components use ADO technology to access data from existing data control components such as: DBGRID and DBEDIT. It does not require Borland Database Engine (BDE). But the ADO / OLEDB runtime library must be installed. ADO is pre-installed in Windows2000, XP, 2003. In other versions of 98, ADO must be installed separately using Microsoft Data Access Components (MDAC), which can be free from Microsoft's website. Like the ODBC driver, the ADO driver can also access a special data warehouse, the Providres and ODBC drivers are different for different data warehouses, so they must be installed separately. The use of ADO components is very easy and runs high, and more important is that it only uses very little system resources. In addition, the ADO component allows users to use a database of various system resources, strong storage procedures, batch updates, cursors, and support Multiple RecordSets. With BCB5, seven ADO components are provided, which are: Component's main function AdoConnection is used to establish a permanent connection of the ADO database and support transaction.

Because there are too many customs, I haven't been updated for a long time, I am really sorry, I am going to continue this document recently!

转载请注明原文地址:https://www.9cbs.com/read-83980.html

New Post(0)