Show / Hide Table of Contents

Method sqlite.Execute(+ 2 overloads)


Overload

Calls sqlite3_exec to execute one or more SQL statements that don't return data.

public void Execute(string sql)
Parameters
sql  (string)

SQL statement, or several ;-separated statements.

Exceptions
SLException

Failed to execute sql.


Overload(next)

Executes single SQL statement that does not return data. Binds values.

public void Execute(string sql, params object[] bind)
Parameters
sql  (string)

Single SQL statement.

bind  (object[])

Values that will replace ? characters in sql. Read about SQL parameters in SQLite website. Supported types: sqliteStatement.BindAll. Example: sqlite.

Exceptions
SLException

Failed.

NotSupportedException

sql contains more than single SQL statement.


Overload(top)

Executes single SQL statement that does not return data. To bind values calls callback function.

public void Execute(string sql, Action<sqliteStatement> bind)
Parameters
sql  (string)

Single SQL statement.

bind  (Action<sqliteStatement>)

Callback function that should bind (sqliteStatement.Bind) values to ? characters in sql. Read about SQL parameters in SQLite website.

Exceptions
SLException

Failed.

NotSupportedException

sql contains more than single SQL statement.