[Top] [Prev] [Next] [Bottom] [Contents]

Object Editor

The Object Editor is used to create, modify and delete Data Objects. Each Data Object has specific operations that can be performed on that Data Object Type. These operations will be explained in detail as they show up.

The following section provides an image of each state of the Object Editor and a description of the major components.

States of the interface

Figure 2-13 Object Editor in PROC State

About the PROC State

Area Description
Menu Bar Pulldown menu options.
Object ID Contains the Server and Database associated with the Data Object. The Object ID can only be set with the Object Selector. The format is: server|database
Object Name The Object Name is the name of the current object in the Object Editor. This cannot be changed directly. To change, use Save As.
Arguments Area is where stored procedure arguments are declared.
Body This area is where stored procedure bodies are defined.
Test Allows the user to test PROC and DSQL objects.
Object Type Contains the Data Object Type of the current Data Object.
Argument Edit When pressed, this button will invoke an instance of a simple text editor for modifying the argument declarations.
Body Edit When pressed, this button will invoke an instance of a simple text editor for modifying the body definitions.

Figure 2-14 Object Editor in DSQL State

Area Description
Menu Bar Pulldown menu options.
Object ID Contains the Server and Database associated with the Data Object. The Object ID can only be set with the Object Selector. The format is: server|database
Object Name The Object Name is the name of the current object in the Object Editor. This cannot be changed directly. To change, use Save As.
Body This area is where DSQL bodies are defined.
Test Allows the user to test PROC and DSQL objects.
Object Type Contains the Data Object Type of the current Data Object.
Body Edit When pressed, this button will invoke an instance of a simple text editor for modifying the body definitions.

Figure 2-15 Object Editor in FILE State

Area Description
Menu Bar Pulldown menu options.
Object Name The Object Name is the name of the current object in the Object Editor. This cannot be changed directly. To change, use Save As.
File Name The File Name is the name of the file that will be read or appended to.
Mode Determines if the file specified should be read from or appended to.
Input/Output Area When the Mode is set to Read, this area's data is used for reading to the file. When Mode is set to Append, this area's data is used for writing to the file. See the subsection titled "Output Area" on page 2-36.
Options This invokes the Options Editor. There are 6 options that can be modified (See Data Objects): FilePath, SetWorkDir, FileNumCols, FileOneRow, RunGenericOnOrb, OrbDefaultVendor
Object Type This contains the Data Object Type of the current Data Object.
Permissions This area is not used in Sapphire/Web at this time.

Figure 2-16 Object Editor in EXEC State

Area Description
Object Name The Object Name is the name of the current object in the Object Editor. This cannot be changed directly. To change, use Save As.
Executable Name The Executable Name is the name of the executable that will executed and processed. You need to specify the absolute path to this executable.
Command-Line These are the command line arguments to be passed to the executable.
Standard-In These are the arguments to be passed to the executable on stdin
Output Area See the subsection titled "Output Area" on page 2-36.
Options This invokes the Options Editor. There are 6 options that can be modified (See Data Objects): FilePath, SetWorkDir, FileNumCols, FileOneRow, RunGenericOnOrb, OrbDefaultVendor
Object Type This contains the Data Object Type of the current Data Object.
CL Argument Edit When pressed, this button will invoke an instance of a simple text editor for modifying the Command-Line Arguments.
SI Argument Edit Invokes a simple text editor for modifying the Standard-In Arguments.

Figure 2-17 Object Editor in FUNC State

Area Description
Menu Bar Pulldown menu options.
Object Name The Object Name is the name of the current object in the Object Editor. This cannot be changed directly. To change, use Save As.
Function Name The Function Name is the name of the function, as declared in the C header file that will be called during the execution of the Data Object.
Arguments This behaves very much like the Output Area. Simply type the argument name into the Name textField, and press Add to add arguments to the list. Select an argument and press Delete to remove it from the list. Double-click the list item to copy the selected argument to the Name textField. Use the shuffle-up and shuffle-down buttons, located behind the list, to re-order the selected list item.
Output Area See the subsection for Output Area.
Options This invokes the Options Editor. There are 3 options that can be modified (See Data Objects): SetWorkDir, RunGenericOnOrb, OrbDefaultVendor
Object Type This contains the Data Object Type of the current Data Object.

Pulldown Menus

File

Option Description
New Invokes the Object Selector. From the Object Selector, the name of a new Data Object can be specified. New changes the state of the Object Editor if a different Data Object Type was chosen in the Object Selector.
Open Invokes the Object Selector. From the Object Selector, the name of a Data Object to open can be specified. Open changes the state of the Object Editor if a different Data Object Type was chosen in the Object Selector. The selected object will become the current Data Object in the Object Editor.
Save Saves the current Data Object to the Database or UNIX file system, depending on the Data Object Type.
Save As Invokes the Object Selector. From the Object Selector, the name of a new Data Object to save can be specified. The new Data Object will be saved and become the current Data Object in the Object Editor.
Close Closes the Object Editor.

Edit

Option Description
Privileges Invokes the Privileges Dialog for PROC Data Objects. See the Privilege Dialog subsection.
Delete Objects For PROC Data Objects, this option drops the stored procedure from the Database. For DSQL, FILE, EXEC and FUNC Data Objects, this option removes the Data Object from the UNIX file system.

View

Option Description
See SQL This option invokes the SQL Viewer for PROC and DSQL objects. PROC - shows the CREATE PROCEDURE statement used to create the PROC. DSQL - shows the assembled DSQL statement as it will be sent to the Database for parsing. See Data Objects for changing the default value of arguments to be other than zero (0).

Tools

Option Description
Document Manager Invokes the Document Manager.
Object Editor Invokes another instance of the Object Editor.
Database Browser Invokes an instance of the Database Browser.

Help

Option Description
About Displays the About Sapphire/Web Dialog.
Interfaces Provides on-line help for the Object Editor interface.

How to Invoke the Interface

1. From the Project Window's Tools menu
2. From the Project Window's Main Button Bar
3. From the Database Browser's Tools Menu
4. From the Object Editor's Tools Menu
5. From the Object Bind Editor's Tools Menu.

Output Area

The Output Area is used in FILE, EXEC and FUNC States of the Object Editor. It works the same in all three Object Editor States.

The Output Area looks like the following Figures:

Figure 2-18 Output Area Using Delimited Output

Figure 2-19 Output Area Using Fixed Width Output

About the Output Area

Area Description
Delimited Toggles the Output Area between using delimited columns and fixed-width columns.
Add Adds the contents of Width and Name to the Column Name List. If nothing is selected in the Column Name List, the new column definition is added to the end of the list. If a column is selected in the Column Name List, the new column is added after the selected item.
Width This field is used to specify the width of the column associated with the column name contained in Name.
Name This is the name of the new column to be defined. This will show up in the Object Bind Editor as result columns for the Data Object the columns are associated with.
Delete Removes the selected column from the Column Name List.
String Delim Specifies what character will delimit a string in a row of data generated by the Data Object. If a string value in a delimited row contains the Column Delim character, the column will be wrapped with this delimiter so it is not parsed as another column. Example: Column Delim = , (comma) String Delim = " (double quote) Row with 5 columns = 10,"Scott",30,"Bluestone, Inc.",50 Without the String Delim, the comma in Bluestone, Inc. would look like an extra column and the data for column 5 would be Inc. instead of 50, and have 6 columns.
Column Delim Specifies what character will delimit a column in a row of data generated by the Data Object. Example: Column Delim = , (comma) Row with 5 columns = 5,ten,15,twenty,25
Shuffle-Up Used to reorder the Column Name List. Shuffle-Up exchanges the selected column in the Column Name List with the column above it.
Column Name List This is where defined columns are stored. They are in the order they are expected to be in the Data Source.
Shuffle-Down Used to reorder the Column Name List. Shuffle-Down exchanges the selected column in the Column Name List with the column below it.

Defining Delimited Columns

1. Set the Delimited toggle to on (button is depressed).
2. Choose the Column Delimiter from the Column Delim combo.
3. Choose the String Delimiter from the String Delim combo.
4. Add all of the column names to the Column Name List. With delimited data, no width needs to be specified.

Defining Fixed Width Columns

1. Set the Delimited toggle to off (button is not depressed)
2. Type a column width and name into the Width and Name textFields, respectively.
3. Press the Add button. The width and column are added to the Column Name List.
4. Repeat steps 2 and 3 until all of the Data Object's columns are defined.

Arguments for EXEC Data Objects

When specifying Arguments for EXEC Data Objects, use this simple format:

#name, type[, remove_previous]
Where

Examples:

Argument definition Data provided by end-user Resulting String
-f #filename, WRAP# -v NULL -f -v
-f #filename, NO_WRAP, True# -v NULL -v
See Data Objects for more information and examples.

Testing PROC and DSQL Data Objects

When the Test button is pressed, different things will happen based upon whether the Data Object has arguments and/or results:

Has Arguments Has Results What Happens
A dialog will appear displaying the Error Code, Return Status and Rows Affected.
X The Test Arguments Dialog is invoked. This prompts the user for argument values to use for testing the Data Object. After Ok is pressed, a dialog will appear displaying the Error Code, Return Status and Rows Affected.
X The Object Results Viewer is invoked. This displays all of the data returned by the Data Object in a matrix of rows and columns. The Error Code and Result Code are also displayed in the Object Results Viewer.
X X The Test Arguments Dialog is invoked. This prompts the user for argument values to use for testing the Data Object. After Ok is pressed, the Object Results Viewer is invoked. This displays all of the data returned by the Data Object in a matrix of rows and columns. The Error Code and Result Code are also displayed in the Object Results Viewer.

If during testing you get an error stating that one of your columns cannot be null, your insert statement needs to have a default value for each column that does not allow null values. The following is an example of a viable insert statement:

insert into table
(column1, column2, column3)
values(#column1, WRAP, VALUE1#, #column2, WRAP, VALUE2#, 
#column3, WRAP, 	VALUE3#)

Test Arguments Dialog

The Test Argument Dialog is used when testing PROC and DSQL Data Objects. If the Data Object has arguments, this dialog is invoked so the user can enter argument values to test the Data Object.

Figure 2-20 Test Arguments Dialog

Option Description
Argument Provides information about the argument and has the format: name -> type(dimension)
Value This is where the user enters a value to test for the argument it is associated with.
Edit Value This button invokes a simple text editor for entering argument values in the Value textField.
See SQL Invokes the SQL Viewer which displays the SQL statement that is used for testing. The arguments entered are displayed in the statement in the proper location(s).
Argument List This list contains one row for each argument in the Data Object being tested. Each row contains: Argument - Value - Edit Value



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.