DumontEXE 0.0.1
Public Slots
cmcDatabase Class Reference

Commence Database Object. More...

#include <cmcDatabase.h>

Inheritance diagram for cmcDatabase:

List of all members.

Public Slots

virtual cmcFormform (long index)
 Return a Form by Index
.
virtual cmcFormform (const QString &name)
 Return a Form by Name
.
virtual cmcFormforms (long index)
 Return a Form by Index
.
virtual cmcFormforms (const QString &name)
 Return a Form by Name
.
virtual cmcFormsforms ()
 Return the Forms collection
.
virtual cmcConversationgetConversation (const QString &applicationName="", const QString &topic="")
 Create a conversation object
.
virtual cmcCursorgetCursor (long mode, const QString &name, long flags=0)
 Get a Cursor Object
.
virtual cmcCursorgetCursor (const QString &name, long flags=0)
 extended: Get a Cursor Object

virtual cmcItemgetItem (const QString &categoryName, const QString &itemKey="", long flags=0)
 Get a Commence Item by Item Name
.
virtual cmcItemgetItemByField (const QString &categoryName, const QString &fieldName, const QString &qualifier, const QString &value, bool notFlag=false, bool caseSensitive=false)
 Get a Commence Item by a Field Value
.
virtual cmcItemgetItemByGuid (const QString &categoryName, const QString &itemGuid, long flags=0)
 Get a Commence Item by Guid
.
virtual cmcItemsgetItems (const QString &categoryName)
 Get a Commence items list
.
virtual QString getLastID (const QString &category, const QString &field, const QString &filter="")
 Get Last ID.
virtual cmcMeInfomeInfo ()
 Me Info
.
virtual QString name ()
 Name of the Commence database
.
virtual QString path ()
 Full path of the Commence database
.
virtual cmcFormpreviousForm ()
 Return Previous Form
.
virtual QString registeredUser ()
 CR/LF delimited string with user name, company name and serial number
.
virtual bool shared ()
 TRUE if database is enrolled in a workgroup
.
virtual QString version ()
 Version number in x.y format
.
virtual QString versionExt ()
 Version number in x.y.z.w format
.

Detailed Description

Commence Database Object.

Todo:
Item Models The Database object should provide data models compatible with the Qt framework instead of requiring that all data access is performed through the cursors and rowsets. This would allow programmers to to use the Qt user interface controls as activex components in their applications, as well as simplify the whole data interface.

Definition at line 57 of file cmcDatabase.h.


Member Function Documentation

cmcForm * form ( long  index) [virtual, slot]

Return a Form by Index
.

Definition at line 322 of file cmcDatabase.cpp.

cmcForm * form ( const QString &  name) [virtual, slot]

Return a Form by Name
.

Definition at line 327 of file cmcDatabase.cpp.

virtual cmcForm* forms ( long  index) [inline, virtual, slot]

Return a Form by Index
.

Definition at line 288 of file cmcDatabase.h.

virtual cmcForm* forms ( const QString &  name) [inline, virtual, slot]

Return a Form by Name
.

Definition at line 306 of file cmcDatabase.h.

cmcForms * forms ( ) [virtual, slot]

Return the Forms collection
.

Definition at line 302 of file cmcDatabase.cpp.

cmcConversation * getConversation ( const QString &  applicationName = "",
const QString &  topic = "" 
) [virtual, slot]

Create a conversation object
.

Definition at line 105 of file cmcDatabase.cpp.

cmcCursor * getCursor ( long  mode,
const QString &  name,
long  flags = 0 
) [virtual, slot]

Get a Cursor Object
.

This is the original version of the Get Cursor function. This function accepts the cursor mode just like the original Commence version. The flags parameter is not required.

vbScript Example ~ original (code compatible) method of opening a cursor
 dim dexe: set dexe = createObject("Dumont.EXE") ' hook dumont
 dim dapp: set dapp = dexe.applications("MyDB")  ' fetch an app from the R.O.T.

 '
 ' get a cursor the 'old fashioned' way.  Specify the 'mode' and 'flags'
 '
 dim cursor: set cursor = dapp.db.getCursor(0,"Person",0)
See also:
getCursor( simplified )
Cursor Modes
Returns:
cmcCursor object
Parameters:
modelong ~ see: Cursor Modes

nameString ~ must be an existing category name

flagslong ~ defaults to 0

Definition at line 181 of file cmcDatabase.cpp.

cmcCursor * getCursor ( const QString &  name,
long  flags = 0 
) [virtual, slot]

extended: Get a Cursor Object

This is a simplified version of the Get Cursor function. This function assumes a cursor 'mode' zero, which opens a cursor on the category directly, and not on one of the views or pilot categories.

vbScript Example ~ simplified method of opening a cursor
 dim dexe: set dexe = createObject("Dumont.EXE") ' hook dumont
 dim dapp: set dapp = dexe.applications("MyDB")  ' fetch an app from the R.O.T.

 '
 ' get a cursor the easy way.  
 '
 dim cursor: set cursor = dapp.db.getCursor("Person")
See also:
getCursor( original )
Returns:
cmcCursor object
Parameters:
nameString ~ must be an existing category name

flagslong ~ defaults to 0

Definition at line 172 of file cmcDatabase.cpp.

cmcItem * getItem ( const QString &  categoryName,
const QString &  itemKey = "",
long  flags = 0 
) [virtual, slot]

Get a Commence Item by Item Name
.

This will get an item from a category by item name. In order for this procedure to work properly the item name referenced must be unique. It does not matter if the category allows duplicates or not, just so long as the item name referenced can be found by its name property.

Returns:
cmcItem
Parameters:
categoryNamestring ~ name of the category

itemKeystring ~ Item Name Value (optional must be unique)

flagslong ~ flags (default to zero)

Definition at line 233 of file cmcDatabase.cpp.

cmcItem * getItemByField ( const QString &  categoryName,
const QString &  fieldName,
const QString &  qualifier,
const QString &  value,
bool  notFlag = false,
bool  caseSensitive = false 
) [virtual, slot]

Get a Commence Item by a Field Value
.

Parameters:
categoryNamestring ~ Category Name

fieldNamestring ~ Field Name

qualifierstring ~ Qualifier (F,CTI,CTCTI...)

valuestring ~ Value

notFlagboolean ~ Not Flag

caseSensitiveboolean ~ Case Sensitive

Definition at line 261 of file cmcDatabase.cpp.

cmcItem * getItemByGuid ( const QString &  categoryName,
const QString &  itemGuid,
long  flags = 0 
) [virtual, slot]

Get a Commence Item by Guid
.

Parameters:
categoryNamestring ~ name of the category

itemGuidstring ~ guid value of the item

flagslong ~ flags (default to zero)

Definition at line 247 of file cmcDatabase.cpp.

cmcItems * getItems ( const QString &  categoryName) [virtual, slot]

Get a Commence items list
.

Note:
Be careful with this function call! If you do not filter the set .or. apply some limited columns to it before querying any of the fields, you're going to end up crashing your db due to data overload ~ unless you have just a few items.
Parameters:
categoryNamestring ~ Category Name

Definition at line 278 of file cmcDatabase.cpp.

QString getLastID ( const QString &  category,
const QString &  field,
const QString &  filter = "" 
) [virtual, slot]

Get Last ID.

This will fetch the last ID number used on a category. It is based upon the assumption that the field is sortable and will sort in the negative which will put the last ID string used as the first record in the set.

Definition at line 351 of file cmcDatabase.cpp.

cmcMeInfo * meInfo ( ) [virtual, slot]

Me Info
.

Definition at line 342 of file cmcDatabase.cpp.

QString name ( ) [virtual, slot]

Name of the Commence database
.

Reimplemented from cmcObject.

Definition at line 57 of file cmcDatabase.cpp.

QString path ( ) [virtual, slot]

Full path of the Commence database
.

Definition at line 65 of file cmcDatabase.cpp.

cmcForm * previousForm ( ) [virtual, slot]

Return Previous Form
.

Return a handle on the form that was opened just prior to this form.

vbScript Example ~ Access Previous Form
 dim dexe: set dexe = createObject("Dumont.EXE")
 dim dfrm: set dfrm = dexe.form(Form)

 dim pfrm: set pfrm = dfrm.db.previousForm

 if( not pfrm is nothing ) then

   dexe.debug "itemName: " & pfrm.itemName
   dexe.debug "keyField: " & pfrm.keyField.value

 end if
Note:
In order for this function to work properly, two forms must be opened. If there is only one form opened, then this function will return a NULL object.

Definition at line 332 of file cmcDatabase.cpp.

QString registeredUser ( ) [virtual, slot]

CR/LF delimited string with user name, company name and serial number
.

Definition at line 73 of file cmcDatabase.cpp.

bool shared ( ) [virtual, slot]

TRUE if database is enrolled in a workgroup
.

Definition at line 81 of file cmcDatabase.cpp.

QString version ( ) [virtual, slot]

Version number in x.y format
.

Definition at line 89 of file cmcDatabase.cpp.

QString versionExt ( ) [virtual, slot]

Version number in x.y.z.w format
.

Definition at line 97 of file cmcDatabase.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com