Returns the SQL statement which was sent to the database to form the resultset in the currently visible listbox of databox.
The SQL statement may contain more fields than the user has chosen to display in his listbox view.
Example of a returned string:
SELECT t.id AS id, Location As 'Location',Year As 'Year',CodeType As 'Type',CodeStatus As 'Status',PriceCodes,Title As 'Title',PublicNumber As 'Number',Registrations As 'Registrations',PrintTitleD,PrintTitleF,PrintTitleE,InvoiceTextD As 'Lead',DescriptionD As 'Beschreibung',InvoiceTextE As 'Preparation',DescriptionE As 'Requirements',InvoiceTextF,DescriptionF,TextModuleD,TextModuleF,TextModuleE,DateCreated As 'Created', DateUpdated As 'Updated', LastEditedBy As 'Editor', Linkbox As 'Linkbox' FROM im_events AS t ,im_key_evt AS k WHERE k.evt_id=t.id AND k.key_id = 1 ORDER BY Title
Returns:
Type |
Value |
Description |
String |
Sql statement |
SQL statement which was sent to the database to form the resultset in the currently visible listbox of databox |
Available in:
WindowMain |
WindowLink |
YES |
NO |
Used in:
XojoScript Name |
GUID |
Copy current SQL Statement from Databox |
2DF5C42C-8BB5-4E65-9C7B-47C05623A707 |
Example XojoScript:
// Copy SQL of Databox, from Scripts Menu
Dim sql As String = GetDataBoxSQL
If sql <> "" Then
SetClipboardText(sql)
MsgBox("SQL copied to clipoard!" + EOL + EOL + sql)
End If