This article focuses on the basic programming of Visual C # databases: How to browse records, modify records, delete records, and insert records. Database programming is always an important aspect of programming language, and it is also a difficult task. Database programming is very rich in content, but the most basic programming is a few, such as: Connect the database, get the required data and data records for browsing, delete, modify, insert and other operations. It also focuses on the data from the following data records.
I. Design and operation of the environment settings:
(1). Windows 2000 Server Edition
(2). Microsoft Data acess Component version 2.6 (MDAC 2.6)
(3). Net FrameWork SDK Beta 2
For a clearer explanation of the problem, the database is selected using the currently typical database, one is the local database Access 2000, and the other is the remote database SQL Server 2000. Where the local database name is "Db.mdb", in which a data table "person" is defined, and the data structure of the person table is the following table:
Field Name field Type field meaning
ID number ordinal
XM Text Name
XB Text Gender
NL text Age
Zip text zip code
The database server name for the remote database SQL Server 2000 is "Server1", the database name is "Data1", the login ID is "sa", the password is empty, and a "person" table is defined in the database, as shown in the data structure.