ibec_GetViewRecreateScript

Creates a Recreate script for a specified view(s) and returns it as a result.

Syntax

    function ibec_GetViewRecreateScript(Connection : variant; ViewName : string; 
    Options : string; ProgressBlock : variant) : string;
 
ConnectionAn active connection created with the ibec_CreateConnection function.
ViewNameList of names of view(s), delimited with semicolon or comma, for which a Recreate script will be created.
OptionsList of options delimited with semicolon; possible options are:
GenerateCreateDetermines whether a CREATE DATABASE statement should be included at the beginning of the generated script.
GenerateConnectDetermines whether a CONNECT statement should be included at the beginning of the generated script.
IncludePasswordDetermines whether the password should be included into the CREATE DATABASE or the CONNECT statement in the resulting SQL script.
SupressCommentsUse to supress comments in the resulting script.
ExtractDescriptionsDetermines whether database objects' descriptions should be included in the generated script. By default this option is enabled.
DescriptionsAsUpdateDetermines whether the raw UPDATE statement should be used for object descriptions instead of the IBExpert specific DESCRIBE statement.
UseCommentGenerates the COMMENT ON statement for object descriptions (Firebird 2.x).
DontUseSetTermDon't use SET TERM statements, all statements will be separated by semicolon only.
UseCreateOrAlterGenerates CREATE OR ALTER instead of CREATE/ALTER where possible.
ProgressBlockAn IBEBlock which will be executed for every progress message generated during script execution. May be NULL or empty.

Description

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.

Example

    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

back to top of page
<< ibec_GetTickCount | IBEBlock | ibec_GUID >>