SqlCeDatabase Methods

Include Protected Members
Include Inherited Members

The SqlCeDatabase type exposes the following members.

Methods

  Name Description
Public method AddInParameter(DbCommand, String, DbType)
Adds a new In DbParameter object to the given command.
(Inherited from Database.)
Public method AddInParameter(DbCommand, String, DbType, Object)
Adds a new In DbParameter object to the given command.
(Inherited from Database.)
Public method AddInParameter(DbCommand, String, DbType, String, DataRowVersion)
Adds a new In DbParameter object to the given command.
(Inherited from Database.)
Public method AddOutParameter
Adds a new Out DbParameter object to the given command.
(Inherited from Database.)
Public method AddParameter(DbCommand, String, DbType, ParameterDirection, String, DataRowVersion, Object)

Adds a new instance of a DbParameter object to the command.

(Inherited from Database.)
Public method AddParameter(DbCommand, String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)
Adds a new In DbParameter object to the given command.
(Inherited from Database.)
Protected method AddParameters
Adds any parameters to the command.
Public method AssignParameters

Discovers parameters on the command and assigns the values from parameterValues to the commands Parameters list.

(Inherited from Database.)
Public method BeginExecuteNonQuery(DbCommand, AsyncCallback, Object)

Initiates the asynchronous execution of the DbCommand which will return the number of affected records.

(Inherited from Database.)
Public method BeginExecuteNonQuery(CommandType, String, AsyncCallback, Object)

Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return the number of rows affected.

(Inherited from Database.)
Public method BeginExecuteNonQuery(DbCommand, DbTransaction, AsyncCallback, Object)

Initiates the asynchronous execution of the DbCommand inside a transaction which will return the number of affected records.

(Inherited from Database.)
Public method BeginExecuteNonQuery(String, AsyncCallback, Object, array<Object[])

Initiates the asynchronous execution of the storedProcedureName using the given parameterValues which will return the number of rows affected.

(Inherited from Database.)
Public method BeginExecuteNonQuery(DbTransaction, CommandType, String, AsyncCallback, Object)

Initiates the asynchronous execution of the the commandText interpreted as specified by the commandType inside a tranasaction which will return the number of rows affected.

(Inherited from Database.)
Public method BeginExecuteNonQuery(DbTransaction, String, AsyncCallback, Object, array<Object[])

Initiates the asynchronous execution of the storedProcedureName using the given parameterValues inside a transaction which will return the number of rows affected.

(Inherited from Database.)
Public method BeginExecuteReader(DbCommand, AsyncCallback, Object)

Initiates the asynchronous execution of a command which will return a IDataReader.

(Inherited from Database.)
Public method BeginExecuteReader(CommandType, String, AsyncCallback, Object)

Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return a IDataReader. When the async operation completes, the callback will be invoked on another thread to process the result.

(Inherited from Database.)
Public method BeginExecuteReader(DbCommand, DbTransaction, AsyncCallback, Object)

Initiates the asynchronous execution of a command inside a transaction which will return a IDataReader.

(Inherited from Database.)
Public method BeginExecuteReader(String, AsyncCallback, Object, array<Object[])

Initiates the asynchronous execution of storedProcedureName using the given parameterValues which will return a IDataReader.

(Inherited from Database.)
Public method BeginExecuteReader(DbTransaction, CommandType, String, AsyncCallback, Object)

Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside an transaction which will return a IDataReader.

(Inherited from Database.)
Public method BeginExecuteReader(DbTransaction, String, AsyncCallback, Object, array<Object[])

Initiates the asynchronous execution of storedProcedureName using the given parameterValues inside a transaction which will return a IDataReader.

(Inherited from Database.)
Public method BeginExecuteScalar(DbCommand, AsyncCallback, Object)

Initiates the asynchronous execution of a command which will return a single value.

(Inherited from Database.)
Public method BeginExecuteScalar(CommandType, String, AsyncCallback, Object)

Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return a single value.

(Inherited from Database.)
Public method BeginExecuteScalar(DbCommand, DbTransaction, AsyncCallback, Object)

Initiates the asynchronous execution of a command inside a transaction which will return a single value.

(Inherited from Database.)
Public method BeginExecuteScalar(String, AsyncCallback, Object, array<Object[])

Initiates the asynchronous execution of storedProcedureName using the given parameterValues which will return a single value.

(Inherited from Database.)
Public method BeginExecuteScalar(DbTransaction, CommandType, String, AsyncCallback, Object)

Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside an transaction which will return a single value.

(Inherited from Database.)
Public method BeginExecuteScalar(DbTransaction, String, AsyncCallback, Object, array<Object[])

Initiates the asynchronous execution of storedProcedureName using the given parameterValues inside a transaction which will return a single value.

(Inherited from Database.)
Public method BuildParameterName
Builds a value parameter name for the current database.
(Overrides Database.BuildParameterName(String).)
Public method CloseSharedConnection
This will close the "keep alive" connection that is kept open after you first access the database through this class. Calling this method will close the "keep alive" connection for all instances. The next database access will open a new "keep alive" connection.
Protected method ConfigureParameter
Configures a given DbParameter.
(Inherited from Database.)
Public method CreateConnection

Creates a connection for this database.

(Overrides Database.CreateConnection().)
Public method CreateFile
Creates a new, empty database file using the file name provided in the Data Source attribute of the connection string.
Protected method CreateParameter(String)

Adds a new instance of a DbParameter object.

(Inherited from Database.)
Public method CreateParameter(String, DbType, Int32, Object)
Creates a new parameter and sets the name of the parameter.
Protected method CreateParameter(String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)

Adds a new instance of a DbParameter object.

(Inherited from Database.)
Protected method CreateWrappedReader
All data readers get wrapped in objects so that they properly manage connections. Some derived Database classes will need to create a different wrapper, so this method is provided so that they can do this.
(Inherited from Database.)
Protected method DeriveParameters
Don't need an implementation for SQL Server CE.
(Overrides Database.DeriveParameters(DbCommand).)
Public method DiscoverParameters
Discovers the parameters for a DbCommand.
(Inherited from Database.)
Protected method DoExecuteNonQuery
Executes the query for command.
(Inherited from Database.)
Public method EndExecuteNonQuery
Finishes asynchronous execution of a SQL statement, returning the number of affected records.
(Inherited from Database.)
Public method EndExecuteReader
Finishes asynchronous execution of a Transact-SQL statement, returning an IDataReader.
(Inherited from Database.)
Public method EndExecuteScalar

Finishes asynchronous execution of a Transact-SQL statement, returning the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

(Inherited from Database.)
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public method ExecuteDataSet(DbCommand)

Executes the command and returns the results in a new DataSet.

(Inherited from Database.)
Public method ExecuteDataSet(CommandType, String)

Executes the commandText interpreted as specified by the commandType and returns the results in a new DataSet.

(Inherited from Database.)
Public method ExecuteDataSet(DbCommand, DbTransaction)

Executes the command as part of the transaction and returns the results in a new DataSet.

(Inherited from Database.)
Public method ExecuteDataSet(String, array<Object[])
Stored procedures are not supported in SQL Server CE.
(Overrides Database.ExecuteDataSet(String, array<Object[]).)
Public method ExecuteDataSet(DbTransaction, CommandType, String)

Executes the commandText as part of the given transaction and returns the results in a new DataSet.

(Inherited from Database.)
Public method ExecuteDataSet(DbTransaction, String, array<Object[])

Executes the storedProcedureName with parameterValues as part of the transaction and returns the results in a new DataSet within a transaction.

(Inherited from Database.)
Public method ExecuteDataSetSql
Executes a SQL SELECT statement and returns a dataset.
Public method ExecuteNonQuery(DbCommand)

Executes the command and returns the number of rows affected.

(Inherited from Database.)
Public method ExecuteNonQuery(CommandType, String)

Executes the commandText interpreted as specified by the commandType and returns the number of rows affected.

(Inherited from Database.)
Public method ExecuteNonQuery(DbCommand, DbTransaction)

Executes the command within the given transaction, and returns the number of rows affected.

(Inherited from Database.)
Public method ExecuteNonQuery(String, array<Object[])
Stored procedures are not supported in SQL Server CE.
(Overrides Database.ExecuteNonQuery(String, array<Object[]).)
Public method ExecuteNonQuery(DbTransaction, CommandType, String)

Executes the commandText interpreted as specified by the commandType as part of the given transaction and returns the number of rows affected.

(Inherited from Database.)
Public method ExecuteNonQuery(DbTransaction, String, array<Object[])

Executes the storedProcedureName using the given parameterValues within a transaction and returns the number of rows affected.

(Inherited from Database.)
Public method ExecuteNonQuerySql(String, array<DbParameter[])
Executes a SQL statement directly, because SQL Server CE doesn't support stored procedures.
Public method ExecuteNonQuerySql(String, Int32%, array<DbParameter[])
Executes an INSERT statement and given the identity of the row that was inserted for identity tables.
Public method ExecuteReader(DbCommand)

Executes the command and returns an IDataReader through which the result can be read. It is the responsibility of the caller to close the reader when finished.

(Inherited from Database.)
Public method ExecuteReader(CommandType, String)

Executes the commandText interpreted as specified by the commandType and returns an IDataReader through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

(Inherited from Database.)
Public method ExecuteReader(DbCommand, DbTransaction)

Executes the command within a transaction and returns an IDataReader through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

(Inherited from Database.)
Public method ExecuteReader(String, array<Object[])

Executes the storedProcedureName with the given parameterValues and returns an IDataReader through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

(Inherited from Database.)
Public method ExecuteReader(DbTransaction, CommandType, String)

Executes the commandText interpreted as specified by the commandType within the given transaction and returns an IDataReader through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

(Inherited from Database.)
Public method ExecuteReader(DbTransaction, String, array<Object[])

Executes the storedProcedureName with the given parameterValues within the given transaction and returns an IDataReader through which the result can be read. It is the responsibility of the caller to close the connection and reader when finished.

(Inherited from Database.)
Public method ExecuteReaderSql
Executes a command and returns a DbDataReader that contains the rows returned.
Public method ExecuteResultSet(DbCommand, array<DbParameter[])
SQL Server CE provides a new type of data reader, the SqlCeResultSet, that provides new abilities and better performance over a standard reader. This method provides access to this reader.
Public method ExecuteResultSet(DbCommand, DbTransaction, array<DbParameter[])
SQL Server CE provides a new type of data reader, the SqlCeResultSet, that provides new abilities and better performance over a standard reader. This method provides access to this reader.
Public method ExecuteResultSet(DbCommand, ResultSetOptions, array<DbParameter[])
SQL Server CE provides a new type of data reader, the SqlCeResultSet, that provides new abilities and better performance over a standard reader. This method provides access to this reader.
Public method ExecuteResultSet(DbCommand, DbTransaction, ResultSetOptions, array<DbParameter[])
SQL Server CE provides a new type of data reader, the SqlCeResultSet, that provides new abilities and better performance over a standard reader. This method provides access to this reader.
Public method ExecuteScalar(DbCommand)

Executes the command and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

(Inherited from Database.)
Public method ExecuteScalar(CommandType, String)

Executes the commandText interpreted as specified by the commandType and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

(Inherited from Database.)
Public method ExecuteScalar(DbCommand, DbTransaction)

Executes the command within a transaction, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

(Inherited from Database.)
Public method ExecuteScalar(String, array<Object[])
Stored procedures are not supported in SQL Server CE.
(Overrides Database.ExecuteScalar(String, array<Object[]).)
Public method ExecuteScalar(DbTransaction, CommandType, String)

Executes the commandText interpreted as specified by the commandType within the given transaction and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

(Inherited from Database.)
Public method ExecuteScalar(DbTransaction, String, array<Object[])

Executes the storedProcedureName with the given parameterValues within a transaction and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

(Inherited from Database.)
Public method ExecuteScalarSql
Executes the sqlCommand and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetDataAdapter()
Gets a DbDataAdapter with Standard update behavior.
(Inherited from Database.)
Protected method GetDataAdapter(UpdateBehavior)
Gets the DbDataAdapter with the given update behavior and connection from the proper derived class.
(Inherited from Database.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected method GetOpenConnection
Gets a "wrapped" connection that will be not be disposed if a transaction is active (created by creating a TransactionScope instance). The connection will be disposed when no transaction is active.
(Inherited from Database.)
Public method GetParameterValue
Gets a parameter value.
(Inherited from Database.)
Public method GetSqlStringCommand

Creates a DbCommand for a SQL query.

(Inherited from Database.)
Public method GetStoredProcCommand(String)
Because SQL Server CE doesn't support stored procedures, we've changed queries that take a stored procedure name to take a SQL statement instead.
(Overrides Database.GetStoredProcCommand(String).)
Public method GetStoredProcCommand(String, array<Object[])
Because SQL Server CE doesn't support stored procedures, we've changed queries that take a stored procedure name to take a SQL statement instead.
(Overrides Database.GetStoredProcCommand(String, array<Object[]).)
Public method GetStoredProcCommandWithSourceColumns
Wraps around a derived class's implementation of the GetStoredProcCommandWrapper method and adds functionality for using this method with UpdateDataSet. The GetStoredProcCommandWrapper method (above) that takes a params array expects the array to be filled with VALUES for the parameters. This method differs from the GetStoredProcCommandWrapper method in that it allows a user to pass in a string array. It will also dynamically discover the parameters for the stored procedure and set the parameter's SourceColumns to the strings that are passed in. It does this by mapping the parameters to the strings IN ORDER. Thus, order is very important.
(Inherited from Database.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method GetWrappedConnection
Gets a "wrapped" connection for use outside a transaction.
(Overrides Database.GetWrappedConnection().)
Public method LoadDataSet(DbCommand, DataSet, String)

Executes the command and adds a new DataTable to the existing DataSet.

(Inherited from Database.)
Public method LoadDataSet(DbCommand, DataSet, array<String>)

Loads a DataSet from a DbCommand.

(Inherited from Database.)
Public method LoadDataSet(CommandType, String, DataSet, array<String>)

Loads a DataSet from command text.

(Inherited from Database.)
Public method LoadDataSet(DbCommand, DataSet, String, DbTransaction)

Executes the command within the given transaction and adds a new DataTable to the existing DataSet.

(Inherited from Database.)
Public method LoadDataSet(DbCommand, DataSet, array<String>, DbTransaction)

Loads a DataSet from a DbCommand in a transaction.

(Inherited from Database.)
Public method LoadDataSet(String, DataSet, array<String>, array<Object[])
Stored procedures are not supported in SQL Server CE.
(Overrides Database.LoadDataSet(String, DataSet, array<String>, array<Object[]).)
Public method LoadDataSet(DbTransaction, CommandType, String, DataSet, array<String>)

Loads a DataSet from command text in a transaction.

(Inherited from Database.)
Public method LoadDataSet(DbTransaction, String, DataSet, array<String>, array<Object[])

Loads a DataSet with the results returned from a stored procedure executed in a transaction.

(Inherited from Database.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected method SameNumberOfParametersAndValues
Determines if the number of parameters in the command matches the array of parameter values.
(Inherited from Database.)
Public method SetParameterValue
Sets a parameter value.
(Inherited from Database.)
Protected method SetUpRowUpdatedEvent
Sets the RowUpdated event for the data adapter.
(Overrides Database.SetUpRowUpdatedEvent(DbDataAdapter).)
Public method TableExists
Checks to see if a table exists in the open database.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method UpdateDataSet(DataSet, String, DbCommand, DbCommand, DbCommand, UpdateBehavior)

Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet.

(Inherited from Database.)
Public method UpdateDataSet(DataSet, String, DbCommand, DbCommand, DbCommand, DbTransaction)

Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet within a transaction.

(Inherited from Database.)
Public method UpdateDataSet(DataSet, String, DbCommand, DbCommand, DbCommand, UpdateBehavior, Nullable<Int32>)

Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet.

(Inherited from Database.)
Public method UpdateDataSet(DataSet, String, DbCommand, DbCommand, DbCommand, DbTransaction, Nullable<Int32>)

Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet within a transaction.

(Inherited from Database.)
Protected method UserParametersStartIndex
Returns the starting index for parameters in a command.
(Inherited from Database.)

Extension Methods

  Name Description
Public Extension Method CreateSprocAccessor<TResult>(String) Overloaded.
Creates a SprocAccessor<TResult> for the given stored procedure. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSprocAccessor<TResult>(String, IParameterMapper) Overloaded.
Creates a SprocAccessor<TResult> for the given stored procedure. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSprocAccessor<TResult>(String, IRowMapper<TResult>) Overloaded.
Creates a SprocAccessor<TResult> for the given stored procedure.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSprocAccessor<TResult>(String, IResultSetMapper<TResult>) Overloaded.
Creates a SprocAccessor<TResult> for the given stored procedure.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSprocAccessor<TResult>(String, IParameterMapper, IRowMapper<TResult>) Overloaded.
Creates a SprocAccessor<TResult> for the given stored procedure.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSprocAccessor<TResult>(String, IParameterMapper, IResultSetMapper<TResult>) Overloaded.
Creates a SprocAccessor<TResult> for the given stored procedure.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSqlStringAccessor<TResult>(String) Overloaded.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSqlStringAccessor<TResult>(String, IParameterMapper) Overloaded.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSqlStringAccessor<TResult>(String, IRowMapper<TResult>) Overloaded.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSqlStringAccessor<TResult>(String, IResultSetMapper<TResult>) Overloaded.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSqlStringAccessor<TResult>(String, IParameterMapper, IRowMapper<TResult>) Overloaded.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query.
(Defined by DatabaseExtensions.)
Public Extension Method CreateSqlStringAccessor<TResult>(String, IParameterMapper, IResultSetMapper<TResult>) Overloaded.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSprocAccessor<TResult>(String, array<Object[]) Overloaded.
Executes a stored procedure and returns the result as an enumerable of TResult. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSprocAccessor<TResult>(String, IParameterMapper, array<Object[]) Overloaded.
Executes a stored procedure and returns the result as an enumerable of TResult. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSprocAccessor<TResult>(String, IRowMapper<TResult>, array<Object[]) Overloaded.
Executes a stored procedure and returns the result as an enumerable of TResult.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSprocAccessor<TResult>(String, IResultSetMapper<TResult>, array<Object[]) Overloaded.
Executes a stored procedure and returns the result as an enumerable of TResult.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSprocAccessor<TResult>(String, IParameterMapper, IRowMapper<TResult>, array<Object[]) Overloaded.
Executes a stored procedure and returns the result as an enumerable of TResult.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSprocAccessor<TResult>(String, IParameterMapper, IResultSetMapper<TResult>, array<Object[]) Overloaded.
Executes a stored procedure and returns the result as an enumerable of TResult.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSqlStringAccessor<TResult>(String) Overloaded.
Executes a Transact-SQL query and returns the result as an enumerable of TResult. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSqlStringAccessor<TResult>(String, IResultSetMapper<TResult>) Overloaded.
Executes a Transact-SQL query and returns the result as an enumerable of TResult. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)
Public Extension Method ExecuteSqlStringAccessor<TResult>(String, IRowMapper<TResult>) Overloaded.
Executes a Transact-SQL query and returns the result as an enumerable of TResult. The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name.
(Defined by DatabaseExtensions.)

See Also

SqlCeDatabase Class

Microsoft.Practices.EnterpriseLibrary.Data.SqlCe Namespace