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

GetSQLSelect – PB Docs 2022 – PowerBuilder Library

GetSQLSelect – PB Docs 2022

GetSQLSelect

method (DataWindows)

Description

Reports the SQL SELECT statement associated with a DataWindow if its
data source is one that accesses a SQL database (such as SQL Select, Quick
Select, or Query).

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore
object

Syntax

PowerBuilder

Argument

Description

dwcontrol

A reference to a DataWindow control, DataStore, or
child DataWindow

Return value

Returns the current SQL SELECT statement for dwcontrol. GetSQLSelect
returns the empty string (“”) if it cannot return the statement.

If dwcontrol is null, the method returns null.

Usage

When you want to change the SQL SELECT statement for a DataWindow or
DataStore at runtime, you can use GetSQLSelect to save the current SELECT
statement before making the change.

When you define a DataWindow, PowerBuilder stores a PowerBuilder
SELECT statement (PBSELECT) with the DataWindow. If a database is
connected and SetTransObject has been called for the DataWindow, then
GetSQLSelect returns the SQL SELECT statement. Otherwise, GetSQLSelect
returns the PBSELECT statement.

You can also use Describe to obtain the SQL SELECT statement. The
DataWindow object’s Table.Select property holds the information.

Examples

The code saves the SELECT statement for dw_emp in the variable
old_select. Then it adds a WHERE clause. The example assumes the old
SELECT statement did not have one already:

See also

SetSQLSelect


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