Sybase 2 Barcode Reader User Manual


 
CHAPTER 3 Managing the Database
DataWindow Designer User’s Guide 95
Sybase Adaptive Server Enterprise stored procedures
When you use the Database painter to execute a Sybase Adaptive Server
Enterprise system stored procedure, you must start the syntax with the keyword
EXEC or EXECUTE. For example, enter EXEC SP_LOCK. You cannot execute
the stored procedure simply by entering its name.
Importing SQL from a
text file
You can import SQL that has been saved in a text file into the Database painter.
To read SQL from a file:
1 Put the insertion point where you want to insert the SQL.
2 Select Paste Special>From File from the Edit or pop-up menu.
3 Select the file containing the SQL, and click OK.
Dragging a procedure
or function from the
Objects view
From the tree view in the Objects view, you can select an existing procedure or
function that contains a SQL statement you want to enter, and drag it to the
Interactive SQL view.
Executing SQL
When you have the SQL statements you want in the workspace, you can submit
them to the DBMS.
To execute the SQL:
Click the Execute button, or select Design>Execute SQL from the menu
bar.
If the SQL retrieves data, the data appears in grid format in the Results view. If
there is a database error, you see a message box describing the problem.
For a description of what you can do with the data, see “Manipulating data” on
page 86.
Customizing the editor
The Interactive SQL view provides the same editing capabilities as the file
editor. It also has Script, Font, and Coloring properties that you can change to
make SQL files easier to read. With no change in properties, SQL files have
black text on a white background and a tab stop setting of 3 for indentation.