Share via


SqliteCommand Class

Definition

Represents a SQL statement to be executed against a SQLite database.

public class SqliteCommand : System.Data.Common.DbCommand
type SqliteCommand = class
    inherit DbCommand
Public Class SqliteCommand
Inherits DbCommand
Inheritance
SqliteCommand

Constructors

SqliteCommand()

Initializes a new instance of the SqliteCommand class.

SqliteCommand(String, SqliteConnection, SqliteTransaction)

Initializes a new instance of the SqliteCommand class.

SqliteCommand(String, SqliteConnection)

Initializes a new instance of the SqliteCommand class.

SqliteCommand(String)

Initializes a new instance of the SqliteCommand class.

Properties

CommandText

Gets or sets the SQL to execute against the database.

CommandTimeout

Gets or sets the number of seconds to wait before terminating the attempt to execute the command. Defaults to 30. A value of 0 means no timeout.

CommandType

Gets or sets a value indicating how CommandText is interpreted. Only Text is supported.

Connection

Gets or sets the connection used by the command.

DataReader

Gets or sets the data reader currently being used by the command, or null if none.

DbConnection

Gets or sets the connection used by the command. Must be a SqliteConnection.

DbParameterCollection

Gets the collection of parameters used by the command.

DbTransaction

Gets or sets the transaction within which the command executes. Must be a SqliteTransaction.

DesignTimeVisible

Gets or sets a value indicating whether the command should be visible in an interface control.

Parameters

Gets the collection of parameters used by the command.

Transaction

Gets or sets the transaction within which the command executes.

UpdatedRowSource

Gets or sets a value indicating how the results are applied to the row being updated.

Methods

Cancel()

Attempts to cancel the execution of the command. Does nothing.

CreateDbParameter()

Creates a new parameter.

CreateParameter()

Creates a new parameter.

Dispose(Boolean)

Releases any resources used by the connection and closes it.

ExecuteDbDataReader(CommandBehavior)

Executes the CommandText against the database and returns a data reader.

ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken)

Executes the CommandText asynchronously against the database and returns a data reader.

ExecuteNonQuery()

Executes the CommandText against the database.

ExecuteReader()

Executes the CommandText against the database and returns a data reader.

ExecuteReader(CommandBehavior)

Executes the CommandText against the database and returns a data reader.

ExecuteReaderAsync()

Executes the CommandText asynchronously against the database and returns a data reader.

ExecuteReaderAsync(CancellationToken)

Executes the CommandText asynchronously against the database and returns a data reader.

ExecuteReaderAsync(CommandBehavior, CancellationToken)

Executes the CommandText asynchronously against the database and returns a data reader.

ExecuteReaderAsync(CommandBehavior)

Executes the CommandText asynchronously against the database and returns a data reader.

ExecuteScalar()

Executes the CommandText against the database and returns the result.

Prepare()

Creates a prepared version of the command on the database.

Applies to