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

Error code –10194
Error constant EL_DNET_NO_PREPARE_ON_CLOSED
Parameter 1 The SQL statement.
Probable cause

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