Sybase 2 Barcode Reader User Manual


 
CHAPTER 3 Managing the Database
DataWindow Designer User’s Guide 93
Creating stored procedures
You can use the Interactive SQL view to create stored procedures or triggers,
but make sure that the painter's SQL statement terminator character is not the
same as the terminator character used in the stored procedure language of your
DBMS.
About the statement
terminator
By default, DataWindow Designer uses the semicolon as the SQL statement
terminator. You can override the semicolon by specifying a different terminator
character in the Database painter. To change the terminator character, select
Design>Options from the Database painter’s menu bar.
Make sure that the character you choose is not reserved for another use by your
database vendor. For example, using the slash character (/) causes compilation
errors with some DBMSs.
Controlling comments
By default, DataWindow Designer strips off comments when it sends SQL to
the DBMS. You can have comments included by clearing the check mark next
to Strip Comments in the pop-up menu of the Interactive SQL view.
Entering SQL
You can enter a SQL statement in four ways:
Pasting the statement
Typing the statement in the view
Opening a text file containing the SQL
Dragging a procedure or function from the Objects view
Pasting SQL
You can paste SELECT, INSERT, UPDATE, and DELETE statements to the view.
Depending on which kind of statement you want to paste, DataWindow
Designer displays dialog boxes that guide you through painting the full
statement.
To paste a SQL statement to the workspace:
1 Click the Paste SQL button in the PainterBar, or select Paste Special>SQL
from the Edit or pop-up menu.
The SQL Statement Type dialog box displays, listing the types of SQL
statements you can use.