ShowWindowSQL(sql As String) As String

 

Executes the sql SELECT statement and displays the resulting list in a Window.

 

sql contains the SQL statement.

  

Parameters:

 

Name

Type

Description

sql

String

A valid sql SELECT statement to the connected database.

See example below.

 

Returns:

 

Type

Value

Description

String

empty string

The sql SELECT statement was successfully executed and a Window with the resulting recordset has been displayed.

String

ERROR

If an error occurred, then the returned string starts with "ERROR" followed by the actual database error message.

 

Available in:

 

WindowMain

WindowLink

YES

NO

 

 Used in:

 

XojoScript Name

GUID

Show ISR Payment List

F4277528-5AC4-4590-9048-DA5322E69481

 

Hint: You can find more references to XojoScripts which make use of this function by sending the following SQL statement to the database:

Select id,GUID, ScriptName,ScriptCode from im_scripts where ScriptCode Like '%ShowWindowSQL%'

 

Example XojoScript:

 

// Show ISR Payment List, from LINKED EVENTS

Dim sql As String = "SELECT isrReferenceNumber, TransactionCode, " _

+ "ISR_CustomerNo, InternalRefNo, " _

+ "id_from,id_to,Amount,TransactionID," _

+ "DatePayment,DateProcessed,DateCredited," _

+ "MicrofilmNo,RejectionCode,Fees,DateCreated " _

+ "FROM " + GetPrefix + "isrpayment ORDER BY DateCreated"

 

Dim result As String

result = ShowWindowSQL(sql)