generateRpsTableCreationScript
generateRpsTableCreationScript(relDataBaseName: String; scriptFile: File; tablesOption: Integer; selectedTableNames: HugeStringArray);
The generateRpsTableCreationScript method of the RelationalView class enables you to programmatically generate a script that creates the tables for an RPS mapping.
The method parameters are listed in the following table.
Parameter | Description |
---|---|
relDataBaseName | Name of the relational database |
scriptFile | Script file that was set up by the caller |
tablesOption | One of the RelationalView class RpsScript_UserTablesOnly (0), RpsScript_UserAndJadeTables (1), or RpsScript_SelectedTables (2) constant values |
selectedTableNames | List of tables to output if the value of the tablesOption parameter is set to RpsScript_SelectedTables; otherwise null |
The SQL script to create the tables is output using the scriptFile parameter. The caller must insure that the file can be created when called. The SQL script must always be created as an ANSI file for use with SQL Server.
Doing the initial write will do an implicit open if it is not open already.
As the file represented by the scriptFile parameter could be open before the generateRpsTableCreationScript method is called, the file is not closed when the method returns.
You can explicitly close the file using the
The tablesOption parameter controls what tables are created in the SQL script, by specifying one of the following RelationalView class constants.
-
RpsScript_SelectedTables, which generates a creation script for the user table names specified in the selectedTableNames parameter
-
RpsScript_UserAndJadeTables, which generates a creation script for all user tables and all Jade RPS tables (that is, JADE_TRANSACTIONS, JADE_CONTROL_INFO, and JADE_EXCEPTION_LOG)
-
RpsScript_UserTablesOnly, which generates a creation script for all user tables in the RPS mapping