Functions
Database Settings

Functions

int mdlDB_activeAutoCommitMode (bool autoCommitMode)
 Used to control when a transaction capable database commits work. More...
 
int mdlDB_activeDAType (int daType)
 Used to set the active displayable attribute type. More...
 
int mdlDB_activeDatabase (WCharCP filespec)
 Attaches the database databaseName to the current design file. More...
 
int mdlDB_activeDeleteMode (bool deleteMode)
 Used to control whether database rows linked to graphics elements are deleted when the graphics element is deleted or the linkages are detached. More...
 
int mdlDB_activeFormsMode (bool formsMode)
 Controls when MicroStation uses screen forms for attribute review and editing. More...
 
int mdlDB_activeLinkageMode (WCharCP mode)
 Sets the active database linkage mode. More...
 
int mdlDB_activeReportFile (WCharCP filename)
 Used to define the report table to be created for an entity during a FENCE REPORT operation. More...
 
int mdlDB_activeReviewTable (WCharCP sqlReview)
 Used to specify an SQL SELECT statement to be used for attribute review operations. More...
 
int mdlDB_activeRowConfirmMode (bool confirmMode)
 Controls when MicroStation prompts for confirmation on a database operation which requires selecting a graphics element with an existing linkage. More...
 

Detailed Description

Function Documentation

int mdlDB_activeAutoCommitMode ( bool  autoCommitMode)

Used to control when a transaction capable database commits work.

Most RDBMSs support the concept of transactions. A transaction is a unit of work which must be committed in its entirety before being posted to the database.

Parameters
[in]autoCommitModeIf true turn auto commit mode on.
Remarks
Normally, the MicroStation database interfaces immediately commit each SQL statement as it is processed. Applications which require greater control over database operations can turn off automatic commits. In this mode, work is normally only committed when a COMMIT statement is submitted to the database through mdlDB_processSQL. Work performed since the last COMMIT may be undone by submitting a ROLLBACK.
Returns
SUCCESS is returned if the transaction mode was successfully changed.
See also
mdlDB_processSQL
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeDatabase ( WCharCP  filespec)

Attaches the database databaseName to the current design file.

Most database products have the concept of a database which is a collection of tables, views, index files, etc., with user accounts and privileges associated with those objects. The argument databaseName defines which database (and MSCATALOG table) is associated with a design file.

Remarks
The mdlDB_activeDatabase function is equivalent to a MicroStation ACTIVE DATABASE (DB=) key-in.
Parameters
[in]filespecCommand string following DB= keyin.
Returns
SUCCESS is returned if the database is successfully attached. Other error codes are listed in dberrs.h.
See also
mdlDB_processSQL
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeDAType ( int  daType)

Used to set the active displayable attribute type.

The displayable attribute type is used when MicroStation builds a displayable attribute linkage for a text node during the ATTACH DA command. The displayable attribute type is an index into the displayable attribute table defined for each entity in MSCATALOG.

Parameters
[in]daTypeAn integer value between 1 and 255 that maps to a row in a displayable attributes table. The displayable attribute format may be either an SQL SELECT statement or a screen form.
Remarks
mdlDB_activeDAType is equivalent to a MicroStation ACTIVE DATYPE (DA=) key-in.
Returns
SUCCESS is returned if the displayable attribute type is successfully changed. Other error codes are listed in dberrs.h.
See also
mdlDB_buildDALinkFromLink
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeDeleteMode ( bool  deleteMode)

Used to control whether database rows linked to graphics elements are deleted when the graphics element is deleted or the linkages are detached.

Parameters
[in]deleteModeIf true when linked rows are to be deleted during graphics delete and detach linkage operations. If false delete and detach operations have no effect on linked rows.
Remarks
mdlDB_activeDeleteMode is equivalent to the MicroStation SET DELETE (ON | OFF) key-in.
Returns
SUCCESS is returned if the deletion mode was successfully changed. Other error codes are listed in dberrs.h.
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeFormsMode ( bool  formsMode)

Controls when MicroStation uses screen forms for attribute review and editing.

Parameters
[in]formsModeIf true then the screen forms defined in MSCATALOG for each entity will be used for attribute review. If false then the SQL Window dialog box will be used.
Remarks
mdlDB_activeFormsMode is equivalent to using the MicroStation SET FORMS (ON | OFF) key-in.
Returns
SUCCESS is returned if the forms mode was successfully changed. Other error codes are listed in dberrs.h.
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeLinkageMode ( WCharCP  mode)

Sets the active database linkage mode.

The linkage mode controls how and when MicroStation adds new rows to the database. When linkages are attached to graphics elements and when elements are copied, MicroStation uses the linkage mode to determine when to add new rows to the database.

Parameters
[in]modeThe argument mode is a character string which specifies the linkage mode. The string may be one of the following values:
Linkage Mode Meaning
"new" each element is linked to a different row
"duplicate" many elements may be linked to the same row
"information" like duplicate mode but don't contribute to reports
"none" no linkages can be created
Remarks
mdlDB_activeLinkageMode is equivalent to the MicroStation key-in ACTIVE LINK (NEW | DUPLICATE | INFORMATION | NONE). Changing the linkage mode will clear the active entity.
Returns
SUCCESS is returned if the linkage mode was successfully changed. Other error codes are listed in dberrs.h.
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeReportFile ( WCharCP  filename)

Used to define the report table to be created for an entity during a FENCE REPORT operation.

During report operations MicroStation creates a new table having the same structure as the primary table and fills the table with each row linked to graphics elements within the fence.

Parameters
[in]filenameThe format of the filename argument is
table:reportTable
where table represents a table in MSCATALOG and reportTable is the name of the table to be created during a FENCE REPORT operation. mdlDB_activeReportFile is equivalent to the MicroStation ACTIVE REPORT (RS=) key-in.
Returns
SUCCESS is returned if the report table is assigned successfully. Other error codes are listed in dberrs.h.
See also
mdlDB_activeReviewTable
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeReviewTable ( WCharCP  sqlReview)

Used to specify an SQL SELECT statement to be used for attribute review operations.

Every entity has an (optional) SQL SELECT statement which is saved in the SQLREVIEW column of MSCATALOG. This SELECT statement is used for attribute review when screen forms mode is turned off.

Parameters
[in]sqlReviewSQL SELECT review statement.
Remarks
The mdlDB_activeReviewTable function is equivalent to the MicroStation ACTIVE REVIEW (RA=) key-in.
Returns
SUCCESS is returned if the SQLREVIEW column is saved correctly in MSCATALOG. Other error codes are listed in dberrs.h.
See also
mdlDB_activeReportFile
Remarks
Required Library: mdlbltin.lib
int mdlDB_activeRowConfirmMode ( bool  confirmMode)

Controls when MicroStation prompts for confirmation on a database operation which requires selecting a graphics element with an existing linkage.

The DEFINE AE and ATTACH DA commands require selecting a graphics element which may contain more than one linkage. If there are multiple linkages and confirmRows is true MicroStation will prompt for confirmation of the row in the SQL Window. If confirmRows is false, the first linkage on the element will be selected.

Parameters
[in]confirmModeConfirm rows if there are multiple linkages.
Remarks
mdlDB_activeRowConfirmMode is equivalent to the MicroStation SET CONFIRM (ON | OFF) key-in.
Returns
SUCCESS is returned if the confirmation mode is successfully set. Other error codes are listed in dberrs.h.
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.