2013年4月11日 星期四

BREW IDatabase IDBMgr IDBRecord


1. create a IDBMgr object
-->ISHELL_CreateInstance( .... AEECLSID_DBMGR ... )

2. open database
--> IDatabase IDBMGR_OpenDatabase(......)

once database is open, IDBMgr is not longer needed
-->IDBMGR_Release(....)

3. Create Record
init AEEDBField
--> set fType, fName, wDataLen, pBuffer
--> IDATABASE_CreateRecord( .... AEEDBField ....)

4. Record Reset, Update, Delete, Get


Simplifying Access to BREW Databases


以下是官方資料

The IDatabase Interface functions allow you to create and access records in databases created and opened with the IDBMgr Interface.

1.
To obtain an instance of the IDatabase Interface , you call IDBMGR_OpenDatabase() to open the desired database.

You then use the IDatabase Interface pointer returned by this function to access the database with the operations described below.

2.
You can also use functions in the IDBRecord Interface to access the fields of individual database records.

3.
When you have completed access to the database, you call IDATABASE_Release() to close it.

4.
The IDATABASE_CreateRecord() function creates a new record and adds it to your database (the function IDBRECORD_Remove() is used to remove a record from the database). Each record contains one or more fields.

5.

Each field is defined by the AEEDBField structure, which includes the following elements:
  • The field name is a descriptor of the field's contents, (name, phone number, email address, etc.) The AEEDBFieldName enumerated type contains constants for commonly used field names.
  • The field type gives the data type of the field (byte, word, double-word, character string, binary, phone number or bitmap).
  • The field buffer pointer is a pointer to the actual contents of the field.
  • The field length is the length in bytes of the field contents.  







沒有留言:

張貼留言