ff_i_sqlite

SQLite functions.

Helpers for the SQLite databases of objects (module, PCs, …).

string SqlPlainExec(string sSQL, object oObject = OBJECT_INVALID)
Parameters:
  • sSQL – SQL statement.

  • oObject – Object whose database is used. Defaults to the module.

Returns:

The SQL error, or “” on success.

Run a SQL statement that has no parameters and returns no rows. Typically used for CREATE, DROP, ALTER, BEGIN and COMMIT statements.

Source code

// @code


// -----------------------------------------------------------------------------

//! @brief Run a SQL statement that has no parameters and returns no rows.
//! Typically used for CREATE, DROP, ALTER, BEGIN and COMMIT statements.
//! @param sSQL SQL statement.
//! @param oObject Object whose database is used. Defaults to the module.
//! @return The SQL error, or "" on success.
string SqlPlainExec(string sSQL, object oObject = OBJECT_INVALID);
string SqlPlainExec(string sSQL, object oObject = OBJECT_INVALID)
{
  if (!GetIsObjectValid(oObject))
    oObject = GetModule();

  sqlquery sqlQuery = SqlPrepareQueryObject(oObject, sSQL);
  SqlStep(sqlQuery);
  return SqlGetError(sqlQuery);
}