Disconnect
This method closes the connection to the database that was opened by this function block instance.
Syntax
METHOD Disconnect : BOOL
Return value
Name | Type | Description |
---|---|---|
Disconnect | BOOL | Displays the status of the method. Returns TRUE as soon as the method execution is finished, even in the event of an error. |
Sample
VAR
fbSqlDatabase : FB_SQLDatabaseEvt(sNetID := '', tTimeout := T#5S);
END_VAR
// disconnect from database
IF fbSqlDatabase.Disconnect() THEN
IF fbSqlDatabase.bError THEN
nState := 255;
ELSE
nState := nState+1;
END_IF
END_IF