O Open
Open or create file or table.
Modes
-
Mode 0—checks whether the specified table already exists. If it does exist, the table and associated indexes are opened in shared update access, if possible.
-
Mode 1—checks whether the specified table already exists. If it does exist, the table and associated indexes are opened in shared update access, if possible. If it does not exist, this mode creates and opens the specified table and indexes.
-
Mode 2—generates the DDL statements necessary to create the table and indexes, if the DBMS and connector support this.
-
Mode 3—reserved for internal use.
-
Mode 4—generates SQL to create referential integrity constraints and associated foreign key rules. If the DBMS does not support declarative referential integrity constraints or triggers, this mode cannot be implemented.
-
Mode 5—generates SQL to drop referential integrity constraints and associated foreign key rules. If the DBMS does not support declarative referential integrity constraints or triggers, this mode cannot be implemented.
-
Mode 6—generates SQL to check the database for rows which violate referential integrity. One SQL query has to be generated for every relationship which is not automatically checked by the DBMS on creation. Connectors generate the query for every relationship which is implemented by means of triggers, not for relationships which are implemented by means of a declarative rule.
Conditions
When the Open request is called with mode 0 or mode 1, the connector is logged on to the DBMS and the specified table is not open.
Description
This request opens or creates a table, or generates Data Definition Language (DDL) to create tables, to create referential integrity rules, to drop referential integrity rules, and to check referential integrity in the DBMS.
For performance reasons the connector may open multiple channels to the table; for example, one for reading and one for updating. The connector is fully responsible for consistent use of multiple channels. The connector closes multiple channels in the Close request.