Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Queries all records as text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SQL | 5.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Command | The command reference number gained with SQL.NewCommand. | $Command | |
FieldDelimiter | The delimiter for between fields. Default is a tab character. |
Optional | |
RowDelimiter | The delimiter between records. Default is newline character. |
Optional |
Returns text or error.
Run and query result as text:
#Create select and run it
Set Variable [$Command; Value:MBS("SQL.NewCommand"; $Connection; "SELECT * FROM Test")]
#Run it
Set Variable [$result; Value:MBS("SQL.Execute"; $Command)]
If [$result ≠ "OK"]
Show Custom Dialog ["Error: " & $result]
Else
Show Custom Dialog ["Inhalt"; MBS("SQL.GetRecordsAsText"; $command)]
End If
#Cleanup
Set Variable [$result2; Value:MBS("SQL.FreeCommand"; $Command)]
Query with Let statement:
Let ( [
command = MBS("SQL.NewCommand"; 22001; "SELECT sqlite_version();");
status = MBS("SQL.Execute"; command);
result = MBS("SQL.GetRecordsAsText"; command);
freed = MBS("SQL.FreeCommand"; Command)
]; result)
This function is free to use.
Created 10th August 2015, last changed 23th September 2021