Navigation: Language Reference > 13 - Built-in Functions >====== SEND (send message to file driver) ====== | |
SEND(file,message)
SEND | Sends a message to the file driver. |
file | The label of a FILE declaration. The FILE's DRIVER attribute identifies the file driver to receive the message. |
message | A string constant or variable containing the information to supply to the file driver. |
The SEND procedure allows the program to pass any driver-specific information to a file driver during program execution. Valid messages are dependent upon the file driver in use. Documentation of all valid SEND messages for a given file driver are listed in the file driver's documentation.
Return Data Type: STRING
Example:
FileCheck = SEND(ClarionFile,'RECOVER=120') !Arm recovery process for a Clarion data file
You can also use the Clarion SEND procedure to send an SQL command to a backend database. This is provided for backward compatibility with early versions of Clarion. We recommend using property syntax to send SQL statements to the backend database.
SEND(SQLFile,'SELECT field1,field2 FROM table1' |
& 'WHERE field1 > (SELECT max(field1)' |
& 'FROM table2') ! Returns a result set you
! get one row at a time
! using NEXT(SQLFile)
SEND(SQLFile,'CALL GetRowsBetween(2,8)') !Call stored procedure
SEND(SQLFile,'CREATE INDEX ON table1(field1 DESC)') !No result set