Use the three-character new object prefix assigned to your project in the name of every custom SQL object you create. The maximum size of an SQL file is 20 KB. If you create any objects for your DataBlade module, add corresponding SQL DROP statements so that the objects are dropped when your DataBlade module is unregistered. To add custom SQL, start the wizard by choosing Edit Insert SQL Files. Enter SQL commands directly into the BladeSmith edit window, or import a disk file into the BladeSmith project. When you import a file, copy the contents of the file at the time you import or import the file by reference so that its contents are copied whenever you generate SQL scripts. The following table lists the properties you specify when you include custom SQL statements.
Descriptive name
SQL file
A descriptive name for the custom SQL statements.
Read SQL text from file
None
Use it to import SQL statements into the CREATE and DROP fields, or to import by reference.
See "Importing SQL Text from a File" for more information.
Custom SQL CREATE text
A text field in which to type SQL CREATE statements.
Custom SQL DROP text
A text field in which to type SQL DROP statements.
Depends on objects
A list of objects on which the custom SQL depends.
See "Object Dependencies" for more information.
Which objects require SQL
A list of objects which depend on the custom SQL.
The following sections describe properties of custom SQL files. Importing SQL Text from a File If you import SQL statements from a text file, separate the CREATE and DROP statements with a line of 40 hyphens ( - ). To import a file by reference, click Browse and select a file from the Open dialog box. If you import by reference, BladeSmith stores the full path and filename. Object Dependencies You can specify whether an SQL command depends upon a DataBlade module object or upon your SQL. These dependencies determine the sequence of SQL commands in the generated objects.sql script. BladeSmith generates SQL in the following sequence:
1. SQL commands to create objects upon which custom SQL commands depend
2. Custom SQL commands
3. SQL commands to create objects that depend upon custom SQL commands