BE_FileMakerSQL ( sqlStatement {; columnSeparator ; rowSeparator ; databaseName ; asText ; outputPath } )

Performs SQL commands on the tables inside FileMaker.

Version : 1.2
1.3 : added optional database parameter to allow operations on databases other than the current one.
4.2 : return container/binary data in addition to text (new asText parameter) and outputPath parameter added.

Parameters :
sqlStatement : the command to perform.
columnSeparator ( optional ) : the column separator for the output data - single characters only.
rowSeparator ( optional ) : the row separator for the output data - single characters only.
database ( optional, introduced in 1.3 ) : allows you to specify an open database other than the current one.
asText ( optional, added in 4.2 ) : this is True by default as the SQL returns data from fields as text.  Set this to false when retrieving a single container field.
outputPath ( optional, added in 4.2 ) : Allows you to write the result of the SQL query to disk.

Result : Empty String or ? for direct errors. All SQL/DDL errors can be obtained via the BE_GetLastDDLError function.

Notes : the new asText only allows you to return a single file.  So although you can perform an SQL query that selects multiple container fields at once, writing them to a container field doesn't make sense, and writing to disk becomes complex when matched with a need to specific all the paths and filenames.  So this function is, by design, limited to a single container field at a time.  If you need multiple fields, use a loop script, or while function.

Still need help? Contact Us Contact Us