Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DELETE – PB Docs 2022 – PowerBuilder Library

DELETE – PB Docs 2022

DELETE

SQL statement

Description

Deletes the rows in TableName specified by Criteria.

Syntax

Parameter

Description

TableName

The name of the table from which you want to delete
rows.

Criteria

Criteria that specify which rows to
delete.

TransactionObject

The name of the transaction object that identifies
the database containing the table. This clause is required only
for transaction objects other than the default
(SQLCA).

Usage

Error handling

It is good practice to test the success/failure code after
executing a DELETE statement. To see if the DELETE was successful, you
can test SLQCode for a failure code. However, if nothing matches the
WHERE clause and no rows are deleted, SQLCode is still set to zero. To
make sure the delete affected at least one row, check the
SQLNRows property of the transaction object.

Examples

Example 1

This statement deletes rows from the Employee table in the
database specified in the default transaction object where Emp_num is
less than 100:

Example 2

These statements delete rows from the Employee table in the
database named in the transaction object named Emp_tran where Emp_num is
equal to the value entered in the SingleLineEdit sle_number:

The integer Emp_num requires a colon in front of it to indicate it
is a variable when it is used in a WHERE clause.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x