Creates a Recreate script for a specified view(s) and returns it as a result.
function ibec_GetViewRecreateScript(Connection : variant; ViewName : string; Options : string; ProgressBlock : variant) : string;
Connection | An active connection created with the ibec_CreateConnection function. |
ViewName | List of names of view(s), delimited with semicolon or comma, for which a Recreate script will be created. |
Options | List of options delimited with semicolon; possible options are: |
GenerateCreate | Determines whether a CREATE DATABASE statement should be included at the beginning of the generated script. |
GenerateConnect | Determines whether a CONNECT statement should be included at the beginning of the generated script. |
IncludePassword | Determines whether the password should be included into the CREATE DATABASE or the CONNECT statement in the resulting SQL script. |
SupressComments | Use to supress comments in the resulting script. |
ExtractDescriptions | Determines whether database objects' descriptions should be included in the generated script. By default this option is enabled. |
DescriptionsAsUpdate | Determines whether the raw UPDATE statement should be used for object descriptions instead of the IBExpert specific DESCRIBE statement. |
UseComment | Generates the COMMENT ON statement for object descriptions (Firebird 2.x). |
DontUseSetTerm | Don't use SET TERM statements, all statements will be separated by semicolon only. |
UseCreateOrAlter | Generates CREATE OR ALTER instead of CREATE/ALTER where possible. |
ProgressBlock | An IBEBlock which will be executed for every progress message generated during script execution. May be NULL or empty. |
ibec_GetViewRecreateScript creates a Recreate script for a specified view(s) and returns it as a result.
Use the IBExpert DB Explorer context-sensitive menu item, Apply Block to selected objects … to recreate selected views based on IBEBlock and the ibec_GetViewRecreateScript function.
execute ibeblock as begin cbb = 'execute ibeblock (MsgData variant) as begin ibec_Progress(MsgData); end'; ... RecreateScript = ibec_GetViewRecreateScript(mydb, 'VIEW_A; VIEW_B; VIEW_C', 'GenerateConnect; IncludePassword; UseCreateOrAlter', cbb); Res = ibec_ExecSQLScript(null, RecreateScript, 'ServerVersion=FB21', cbb); end