ccDataDictionary |
10/13/99 |
Author:
Daniel.Lindh@Home.se ICQ: 7983755 HOMEPAGE: home.bip.net/CyberCow Copyright © Cyber Cow 1995 - 1999. OverView |
Overview |
#include <**class header**> Hierarchy Chart
|
Class Members | ||||||||||||||||||||||||||||||||||||||||||||||||
Macros Private:
Data Items: Private:
Construction Public:
Protected:
Navigation Public:
Update the database Public:
Protected:
Private:
asdf Public:
Protected:
Private:
|
ccDataDictionary::ccDataDictionary | ||||||||
ccDataDictionary( ccDataBase* apDataBase, CString asTableName, UINT nOpenType = snapshot ); Return Value:
Arguments:
Remarks: This is the default constructor who initzialize the ccDataDictionary class.
This member should be overloaded in the derivied class and contain initializiaion of member ccFields. It also opens the table, sort it in right order and sets the primkey.
Usually this class will be created in the constructor of a ccDataBase derivied class. Example: cddTEmployee::cddTEmployee( ccDataBase* pDatabase ) |
ccDataDictionary::addField | ||||
E_ccErrRet addField(ccField * aoField); Return Value:
Arguments:
Remarks: The ccField added by this function should be a member object of this dataDicionary. But this member tell the dictionary that it has this ccField member, so it can be used by intern functions.
This member doesn't need to be called, because it's called automatically from the ccField::init member. And this ccField member will be called from this datadicionarys constructor. Example: not needed. |
ccDataDictionary::sortBy | ||||
E_ccErrRet sortBy( ccField * aoSortField ... ); Return Value:
Arguments:
Remarks: This member will sort the table in a user specified order.
It will also enable moveFirst, movePrev( F7), moveNext(F8) and moveLast functins for the ccdbSuperCtrls connected to ccFields included in the sortBy argument. Example: // From a ccDataDicionary constructor. m_Contact.init ( this, TEmployee_Contact, _T("Contact") ); |
ccDataDictionary::setPrimKey ccDataDictionary::getPrimKey |
||||
void setPrimKey( ccField * aoPrimKey ); throw( ccdbException ) Return Value:
Arguments:
Remarks: If some dataDictionary has a relation to this dd, the child field will be related to the primKey field.
This member will throw a ccdbException if the primkey isn't sorted. Example: m_Contact.init ( this, TEmployee_Contact, _T("Contact") ); open(); |
ccDataDictionary::open | ||||
BOOL open(); Return Value:
Arguments:
Remarks: Opening up the connection to the table in the database. Example: Open(); |
ccDataDictionary::retriveFieldInfo | ||||
E_ccErrRet retriveFieldInfo(); Return Value:
Arguments:
Remarks: Get information from the database table for the connected ccField:s. This is called from the open member and doesn't need to be called from some other place. Example: Not needed |
ccDataDictionary::moveFirst ccDataDictionary::movePrev ccDataDictionary::moveNext ccDataDictionary::moveLast |
||||
E_ccErrRet moveFirst(); Return Value:
Arguments:
Remarks: Move the current record pointer to the first, previous, next or last record in the database table.
It also finds all parent related datadicionary records, and makes this dicionary and all parent dictionarys editable. If the table doesn't have any records the datadictionary will be cleared. |
ccDataDictionary::setBookmark | ||||
E_ccErrRet setBookmark( const CDBVariant& varBookmark ); Return Value:
Arguments:
Remarks: Call this member function to position the recordset on the record containing the specified bookmark. This member does the same stuff that the CRecordset::SetBookmark in MFC with some small exceptions. It won't throw any exceptions, because they will be catched from the setBookmark member. It also finds all parent related datadicionary records, and makes this dicionary and all parent dictionarys editable. If the table doesn't have any records the datadictionary will be cleared. Example: ... cDBVariant l_CyberCow; m_ddCompany.GetBookMark( l_CyberCow ); ... m_ddCompany.SetBookMark( l_CyberCow ); |
ccDataDictionary::requery | ||||
E_ccErrRet requery(); Return Value:
Arguments:
Remarks: This member refreshes the value in the dataDictionarys ccFields with the new values in the database table. This needs to be done to show changes other users has done to the database, like changeing, deleteing or creating a new record.
Exceptions from that is if the datadicionary is a dynaset. Then changes to exsiting records will be reflected automatically (but not additions).
For more info see CRecordset::requery in MSDN help. Example: none |
ccDataDictionary::saveRecord ccDataDictionary::saveRecordNoClear |
||||
E_ccErrRet saveRecord(); E_ccErrRet saveRecordNoClear(); Return Value:
Arguments:
Remarks: Save information in the datadictionary fields to the database and clear all the fields.
But first it will run the backout procedure for all parents dd and this dd. Starting with the top parent. Then it will run the creating procedure for all parents dd and thisdd, starting with the top parent. And after that it will run the updating procedure for all parents dd and this dd starting with this dd. Then it will save the data to the database. And for the saveRecord member the dataDictionary will be cleared so a new record can be typed.
Exceptions are: the backout procedure will only be executed in those dd:s who has an existing record and the creating procedure will be executed on those who has a new record. Example: none |
ccDataDictionary::deleteRecord | ||||
E_ccErrRet deleteRecord(); Return Value:
Arguments:
Remarks: This member will delete the current record. The user will first be asked if she wants the record to be deleted. Caution: In this version no deleting of childs will be done. Example: none |
ccDataDictionary::clearRecord | ||||
E_ccErrRet clearRecord(); Return Value:
Arguments:
Remarks: Clear the current record and prepares so a new record can be typed. If the record is modified the user will first be asked if she wants the record to be cleared. Example: none |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |
ccDataDictionary:: | ||||
**constructor();** Return Value:
Arguments:
Remarks: **Description** Example: **class object;** |