EDB control in Windows Mobile 5.0

Source: Internet
Author: User

Previously, wm5 systems generally used CEDB databases, and EDB is one of the new features in wm5. To improve applicationsProgramCEDB has been replaced by EDB because of its performance and long-term portability. EDB utilizes the storage subsystem used by SQL mobile and provides performance significantly better than CEDB (especially when used together with persistent storage ). Because CEDB provides the same function set as EDB, all functions have the same name and parameter list. However, EDB also contains functions not included in CEDB, And the creation method is different, which is more complex than CEDB. The following describes how to create and use EDB:

I. Create:
1. Cemountdbvol (); // create a volume
2. Cecreatedatabasewithprops (); // create an EDB instance after the volume is created successfully.
3. Cecreatesession (); // creates a session after EDB is created successfully to enable EDB.
4. Ceopendatabaseinsession (); // open EDB
You must create a cedbaseinfoex object before creating EDB. This object is used to create info in EDB and set EDB.
You must maintain a global handle when enabling it. It will be used in future operations.

II. Select data
1. Ceseekdatabaseex (); // locate the data
2. Cereadrecordpropsex (); // read the data to be located.
Create a cepropval object and pass the conditions of the data to be located to this structure.

3. Insert data
Cewriterecordprops (); // write data to EDB
Create a cepropval object or an array of objects to pass the data.

4. Delete data
1. Ceseekdatabaseex (); // locate the data to be deleted
2. Cedeleterecord (); // Delete the data to be located

5. Update Data
The inserted data is basically the same, that is, overwrite existing data.
1. Ceseekdatabaseex (); // locate the data
2. Cewriterecordprops (); // write new data to EDB to overwrite the original data

Sat. Disable EDB
Closehandle (handle when opening );

The key here is the parameter selected when EDB is created and the use of the struct so that data can be correctly located. Otherwise, selection, update, and deletion cannot be achieved.

Related Article

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.