|
|
|
SWC_databaseGetGet a database SWC_databaseGet is a library procedure which allows users to select, allocate and load a database. The input data is a context array name. package require SWC SWC_databaseGet context
Every time the procedure is called the context is checked for a database resource filename. If it is not present then two consecutive SWC windows are displayed from which the user may select a database resource filename and a database path. Otherwise, if a database resource filename is present, then the context is checked for a database path. If there is no database path an SWC window is displayed from which the user may select a database by name. If both a database resource filename and a database path are in the context, the procedure checks whether the database path is included in the database resource file. If not, a SWC window is displayed so that the user may select one of the database names that is in the resource file. When the selection is done the procedure allocates and loads the chosen database, filling the databaseID attribute with the database ID. Then it returns the databaseID. If the procedure completes successfully the context is filled with information about the database resource file's path, database path and database ID. Database Specific Attributes
Return ValueIf SWC_databaseGet succeeds the return is a databaseID. If this procedure encounters an error it will return an error string message in the TK console window. Side EffectsMay update the SWC allocations lists. Examples
Sets the variable resources to the full database resource file's path and filename, including it's path and path. Sets the attribute databaseRsrcFile to the value of resources. Runs SWC_databaseGet and brings up the SWC window. See Also |
|
copyright Video-Collage Inc. |