Design of General Database Access Component Based on COM
Ligang Hou · 2005
COM technique is a prevailing component technology at present. By analyzing the characteristics of COM and database technique, the design and implementation method of general database access component based on COM technique was given. Advanced ADO technology was adopted to connect various kinds of database and accomplish basic database access operation. Utilizing ATL technology as the developing tool of COM, a component of server in-process, i.e. general database access component, was designed and developed, which was tested and applied by developing application program of client end with Visual C++ MFC. Various kinds of database, such as Access, SQL Server, etc. were used as background database. Database was accessed through ODBC interface or directly through various kinds of special database engines. The basic operation functions of querying, adding and deleting data in database are realized. Also, querying basic information of table in database is achieved.