Summary of five small instances in the Redbook

Source: Internet
Author: User

Instance 1

Strsql = "select password from system user where username = '" & username &"'"

The punctuation used here is unclear.

This section describes the system logon dialog box. It mainly describes how to create a database and understand the app. path, because. path doesn't know much about it. This time, because of problems with the app, I am not careful when checking the code. I didn't check the problems I don't know.

It's just for coding, and a lot of knowledge is hard to understand.

 

Instance 2


Use ADO to access the data source

In this example, you can access the previous database, change the data source, use connection to establish a data source connection, and use recordset. The functions of fields and recordset are not clear.

A recordset is a cursor used to save the record set obtained after query execution. It is used to determine the method of accessing the record set, whether the data in the record set can be modified is dead or the modification of the record set can be returned to the database

 

A field set under a dataset is fields.

RS (DataSet object). Fields ("User Name ")

 

Instance 3

Instance 2 is similar to instance 3, but instance 3 calls the database using the adodc control in another way, sets its control attributes, and establishes a connection with the database. instance 2
What about it! Write code and add command button

 

 

When updating the database, a problem was found, and data could not be added or updated. Later, it was found that the database type was incorrect, after I select the dynamic set type, I can add and update data.

Instance 4

Display records by PAGE

The primary space used is the DataGrid. This control can record data by page. It is also a process of calling the database. First, data connection is established. Many problems occur in this process, for example, if we separate the overall word "showdata", the program may not be able to run. In addition, we may not be careful about the fact that the prepared statement is several lines different,

 

 

Adopenstatic is the forward cursor, and adlockreadonly is read-only by default.

 

Instance 5

Data Query

The msflexgrid control is used to display the queried data. The additem control is used to run the program: enter the user name or identity -- open the database -- click query -- use command to create parameters so that msflexfrid has corresponding data

 

In fact, these five examples are a scattered example of our student management system in the future. The following is a mind map made by these five examples.

 

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.