Viewing pending SQL changes

As you create or alter a table definition, you can view the pending SQL syntax changes that will be made when you save the table definition.

StepsTo view pending SQL syntax changes:

  1. Right-click the table definition in the Columns view and select Pending Syntax from the pop-up menu.

    PowerBuilder displays the pending changes to the table definition in SQL syntax:

    The sample is titled Columns ( E A S Demo D B V 4 ) - employee. The first line displayed is ALTER TABLE " d b a " " EMPLOYEE " add :"citizen" char ( 1 ) DEFAULT NULL:. The is followed by update " d b a " dot p b c a t t b l set and a long list of pending changes.

    The SQL statements execute only when you save the table definition or reset the view and then tell PowerBuilder to save changes.

Copying, saving, and printing pending SQL changes

When you are viewing pending SQL changes, you can:

NoteTo copy, save, or print only part of the SQL syntax Select the part of the SQL syntax you want before you copy, save, or print.

StepsTo copy the SQL syntax to the clipboard:

  1. In the Pending Syntax view, click the Copy button or select Select All and then Copy from the pop-up menu.

StepsTo save SQL syntax for execution at a later time:

  1. In the Pending Syntax view, Select File>Save As.

    The Save Syntax to File dialog box displays.

  2. Navigate to the folder where you want to save SQL, name the file, and then click the Save button.

    At a later time, you can import the SQL file into the Database painter and execute it.

StepsTo print pending table changes:

  1. While viewing the pending SQL syntax, click the Print button or select Print from the File menu.

StepsTo display columns in the Columns view:

  1. Select Object>Pending Syntax from the menu bar.