Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

SQL.GetRecordsAsText

Queries all records as text.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
SQL 5.3 Yes Yes Yes Yes Yes

MBS( "SQL.GetRecordsAsText"; Command { ; FieldDelimiter; RowDelimiter } )

Parameters

Parameter Description Example value
Command The command reference number gained with SQL.NewCommand. $Command
FieldDelimiter Optional
The delimiter for between fields. Default is a tab character.
RowDelimiter Optional
The delimiter between records. Default is newline character.

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


SQL.GetParamValueList   -   SQL.InsertOrUpdateRecords

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins