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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
SQL.GetRecordsAsText
Queries all records as text.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| SQL | 5.3 | Yes | Yes | Yes | Yes | Yes |
Parameters
| 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 |
Result
Returns text or error.
Description
Queries all records as text.Don't call SQL.FetchNext before as this function will call it for you to loop over records.
Converts all field content to text.
If you just want one field, maybe you just select the required field with your select statement.
Examples
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)]
See also
Blog Entries
Created 10th August 2015, last changed 11st August 2015
SQL.GetRecordsAsJSON - SQL.InsertOrUpdateRecords
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins