Using SPs to Update the Database
\The Sandbox \PB History & Future \New In PB7 \SP Updates
New look
Object-Centric
Development
Nonmodal
Development
Painter
Features
Wizards
To-Do List
Customizable
Shortcuts
Other IDE
Jaguar
Components
Jaguar Clients
COM/MTS
Components
COM/MTS
Clients
Automation
Servers
Remote
Debugging
Jag & COM/MTS
Validation
DB Interfaces
DB Profiles
DB Utilities
DB
Reconnecting
Creating
ASA DB
DW ActiveX
HTML DW
Image
Support
New controls
SP Updates
ActiveX
Documents
SizeMode
Property
CLSID to
Connect
HTML Books

Description

Updates to the database can now be performed using stored procedures. The DataWindow control submits updates to the database by dynamically generating INSERT, DELETE, and UPDATE SQL statements after determining the status of each row in the DataWindow object. Now you can also define procedural SQL statements in a stored procedure for use by all applications accessing a database. Using stored procedures to perform database updates allows you to enhance database security, integrity, and performance. Since stored procedures provide for conditional execution, you can also use them to enforce additional business rules.

Usage

In the DataWindow painter, select Rows>Stored Procedure Update to display the Stored Procedure Update dialog box. Select the tab for the SQL update method (Delete, Insert, or Update) with which you want to associate a stored procedure. Select the stored procedure you want to be executed when the SQL update method is generated.

The stored procedure you associate with a SQL update method in the Stored Procedure Update dialog box is executed when the DataWindow control calls the Update function. The DataWindow control examines the table in the DataWindow object, determines the appropriate SQL statement for each row, and submits the appropriate stored procedure (as defined in the Stored Procedure Update dialog box) with the appropriate column values substituted for the procedure arguments.

You can use the DataWindow Describe and Modify functions to access DataWindow property values including the stored procedures associated with a DataWindow object.

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com