Attempt to execute SQL statement '%1' after MLDBCommand.Close() was called

Error code –10197
Error constant EL_DNET_NO_EXECUTE_ON_CLOSED
Parameter 1 The SQL statement.
Probable cause

The SQL statement is being executed when the database connection is closed. Make sure the database connection is open before executing a statement.