Home page  
Help >
ddlOpen() - open database
Version 7.11
ddlOpen() - open database
ddlOpen() - open database
ddlOpenR() - open database

Prototype:
   void ddlOpen(
      CONTROL *ctl,
      char *OptnStr,
      char *ArgList);
 
   void ddlOpenR(
      CONTROL *ctl,
      char *OptnStr,
      char *ArgList);

Permitted values in OptnStr:
   /A - accept cycle error
   /S - open for exclusive use;
   /R - open for reading only

Form of ArgList:
<dbname> | <Application-Interface-Name>
Where: <dbname> is the data base name from the DATA BASE NAME IS ... Statement
<Application-Interface-Name> is the name of the custom Application Interface

Description:
Opens an existing Thunderbolt database with the specified interface path and name; [literally, this is the path and name of the .pi file (without the .pi extension)]. In almost all cases, this is the same as the data base name from the DATA BASE NAME IS ... Statement.

The exception is the case where a custom Application Interface is specified. In this case, the interface path and name are derived from the path and name of the symbolic Application Interface file (without the extension).

When specifying the path, the character '/' may be freely substituted for the character '\'.

The ddlOpen() API function is actually a wrapper for two TB API functions; that is, internally, ddlOpen() actually performs:
         ddlBegin()      - Create a new connection; and
         ddlOpenR()    - Open a data base

[The ddlClose() API function is also a wrapper for two TB API functions; internally, ddlClose() actually performs:
         ddlCloseR()   - Close a data base; and
         ddlEnd()        - Close and destroy a connection

Values returned in Control Structure:
Control.Ans1 User Number
Control.Ans2str[] Version String
Control.Ans2 Cycle Number
Control.Ans3
Control.Ans3Str[]
If the target data base has a token map; and if the token map loads successfully; then Control.Ans3 = 0 and Control.Ans3Str[] contains the string "TOKENMAP OK";
If the target data base has a token map; and if the token map does not load successfully; then Control.Ans3 = the error status and Control.Ans3Str[] contains the string "TOKENMAP ERROR: Status=nnn; ...";

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.