SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
SFBDBRecordSmp |
CreateRecord(
AEEDBField* fields
, SInt32 count
)
Create a new database record.
|
SFBDBRecordSmp |
GetNextRecord( Void )
Return the next record from the database.
|
SFBDBRecordSmp |
GetRecordByID(
UInt16 id
)
Return a pointer to the record whose record ID is specified.
|
UInt16 |
GetRecordCount( Void )
Return the number of records in the database.
|
Void |
Reset( Void )
Reset the record index of the database.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] SFBDBRecordSmp CreateRecord( AEEDBField* fields // pointer to the database fields that need to be placed in a new record created by this function SInt32 count // number of fields in the record );
Create a new record in database.
// create SFBDataMgr interface SFBDBMgrSmp dbmgr = SFBDBMgr::NewInstance(); SFBDatabaseSmp database; SFBDBRecordSmp record; // create the field for record setting AChar str[] = {"abcdefg"}; AEEDBField field = {AEEDB_FT_STRING, AEEDBFIELD_TEXT, STRLEN(str), str}; // open database database = dbmgr->OpenDatabase("MyDataBase.db", true); // create a new record in database record = database->CreateRecord(&field, 1);
[ public ] SFBDBRecordSmp GetNextRecord(Void);
Get next record from database.
// create SFBDataMgr interface SFBDBMgrSmp dbmgr = SFBDBMgr::NewInstance(); SFBDatabaseSmp database; SFBDBRecordSmp record; // open database database = dbmgr->OpenDatabase("MyDataBase.db", true); // get next record record = database->GetNextRecord();
[ public ] SFBDBRecordSmp GetRecordByID( UInt16 id // index of record to get );
Get the specified record from database
// create SFBDataMgr interface SFBDBMgrSmp dbmgr = SFBDBMgr::NewInstance(); SFBDatabaseSmp database; SFBDBRecordSmp record; // open database database = dbmgr->OpenDatabase("MyDataBase.db", true); // get the specified record from database record = database->GetRecordByID(3);
[ public ] UInt16 GetRecordCount(Void);
Get the number of records in the database.
// create SFBDataMgr interface SFBDBMgrSmp dbmgr = SFBDBMgr::NewInstance(); SFBDatabaseSmp database; UInt32 recordCount; // open database database = dbmgr->OpenDatabase("MyDataBase.db", true); // get the number of records in the database recordCount = database->GetRecordCount();
[ public ] Void Reset(Void);
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |