Enterprise Library Data Access Application Block
7.0-rc1
The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks.
|
Provides helper methods to make working with a Sql Server Compact Edition database easier. More...
Public Member Functions | |
SqlCeDatabase (string connectionString) | |
Initializes a new instance of the SqlCeDatabase class with a connection string. More... | |
void | 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. More... | |
override DbConnection | CreateConnection () |
Creates a connection for this database. More... | |
override DataSet | ExecuteDataSet (string storedProcedureName, params object[] parameterValues) |
Stored procedures are not supported in SQL Server CE. More... | |
override int | ExecuteNonQuery (string storedProcedureName, params object[] parameterValues) |
Stored procedures are not supported in SQL Server CE. More... | |
override object | ExecuteScalar (string storedProcedureName, params object[] parameterValues) |
Stored procedures are not supported in SQL Server CE. More... | |
override void | LoadDataSet (string storedProcedureName, DataSet dataSet, string[] tableNames, params object[] parameterValues) |
Stored procedures are not supported in SQL Server CE. More... | |
override DbCommand | GetStoredProcCommand (string storedProcedureName, params object[] parameterValues) |
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. More... | |
override DbCommand | GetStoredProcCommand (string storedProcedureName) |
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. More... | |
override string | BuildParameterName (string name) |
Builds a value parameter name for the current database. More... | |
void | CreateFile () |
Creates a new, empty database file using the file name provided in the Data Source attribute of the connection string. More... | |
virtual DbParameter | CreateParameter (string name, DbType type, int size, object value) |
Creates a new parameter and sets the name of the parameter. More... | |
virtual DataSet | ExecuteDataSetSql (string sqlCommand, params DbParameter[] parameters) |
Executes a SQL SELECT statement and returns a dataset. More... | |
virtual int | ExecuteNonQuerySql (string sqlCommand, params DbParameter[] parameters) |
Executes a SQL statement directly, because SQL Server CE doesn't support stored procedures. More... | |
virtual int | ExecuteNonQuerySql (string sqlCommand, out int lastAddedId, params DbParameter[] parameters) |
Executes an INSERT statement and given the identity of the row that was inserted for identity tables. More... | |
virtual IDataReader | ExecuteReaderSql (string sqlCommand, params DbParameter[] parameters) |
Executes a command and returns a DbDataReader that contains the rows returned. More... | |
virtual SqlCeResultSet | ExecuteResultSet (DbCommand command, ResultSetOptions options, params DbParameter[] parameters) |
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. More... | |
virtual SqlCeResultSet | ExecuteResultSet (DbCommand command, params DbParameter[] parameters) |
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. More... | |
virtual SqlCeResultSet | ExecuteResultSet (DbCommand command, DbTransaction transaction, ResultSetOptions options, params DbParameter[] parameters) |
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. More... | |
virtual SqlCeResultSet | ExecuteResultSet (DbCommand command, DbTransaction transaction, params DbParameter[] parameters) |
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. More... | |
virtual object | ExecuteScalarSql (string sqlCommand, params DbParameter[] parameters) |
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. More... | |
virtual bool | TableExists (string tableName) |
Checks to see if a table exists in the open database. More... | |
void | AddInParameter (DbCommand command, string name, DbType dbType) |
Adds a new In DbParameter object to the given command . More... | |
void | AddInParameter (DbCommand command, string name, DbType dbType, object value) |
Adds a new In DbParameter object to the given command . More... | |
void | AddInParameter (DbCommand command, string name, DbType dbType, string sourceColumn, DataRowVersion sourceVersion) |
Adds a new In DbParameter object to the given command . More... | |
void | AddOutParameter (DbCommand command, string name, DbType dbType, int size) |
Adds a new Out DbParameter object to the given command . More... | |
void | AddInOutParameter (DbCommand command, string name, DbType dbType, object value) |
Adds new In/Out DbParameter object to given command More... | |
void | AddInOutParameter (DbCommand command, string name, DbType dbType, int size, object value) |
Adds new In/Out DbParameter object to given command More... | |
virtual void | AddParameter (DbCommand command, string name, DbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value) |
Adds a new In DbParameter object to the given command . More... | |
void | AddParameter (DbCommand command, string name, DbType dbType, ParameterDirection direction, string sourceColumn, DataRowVersion sourceVersion, object value) |
Adds a new instance of a DbParameter object to the command. More... | |
void | DiscoverParameters (DbCommand command) |
Discovers the parameters for a DbCommand. More... | |
virtual DataSet | ExecuteDataSet (DbCommand command) |
Executes the command and returns the results in a new DataSet. More... | |
virtual DataSet | ExecuteDataSet (DbCommand command, DbTransaction transaction) |
Executes the command as part of the transaction and returns the results in a new DataSet. More... | |
virtual DataSet | ExecuteDataSet (DbTransaction transaction, string storedProcedureName, params object[] parameterValues) |
Executes the storedProcedureName with parameterValues as part of the transaction and returns the results in a new DataSet within a transaction. More... | |
virtual DataSet | ExecuteDataSet (CommandType commandType, string commandText) |
Executes the commandText interpreted as specified by the commandType and returns the results in a new DataSet. More... | |
virtual DataSet | ExecuteDataSet (DbTransaction transaction, CommandType commandType, string commandText) |
Executes the commandText as part of the given transaction and returns the results in a new DataSet. More... | |
virtual int | ExecuteNonQuery (DbCommand command) |
Executes the command and returns the number of rows affected. More... | |
virtual int | ExecuteNonQuery (DbCommand command, DbTransaction transaction) |
Executes the command within the given transaction , and returns the number of rows affected. More... | |
virtual int | ExecuteNonQuery (DbTransaction transaction, string storedProcedureName, params object[] parameterValues) |
Executes the storedProcedureName using the given parameterValues within a transaction and returns the number of rows affected. More... | |
virtual int | ExecuteNonQuery (CommandType commandType, string commandText) |
Executes the commandText interpreted as specified by the commandType and returns the number of rows affected. More... | |
virtual int | ExecuteNonQuery (DbTransaction transaction, CommandType commandType, string commandText) |
Executes the commandText interpreted as specified by the commandType as part of the given transaction and returns the number of rows affected. More... | |
virtual IDataReader | ExecuteReader (DbCommand command) |
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. More... | |
virtual IDataReader | ExecuteReader (DbCommand command, DbTransaction transaction) |
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. More... | |
IDataReader | ExecuteReader (string storedProcedureName, params object[] parameterValues) |
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. More... | |
IDataReader | ExecuteReader (DbTransaction transaction, string storedProcedureName, params object[] parameterValues) |
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. More... | |
IDataReader | ExecuteReader (CommandType commandType, string commandText) |
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. More... | |
IDataReader | ExecuteReader (DbTransaction transaction, CommandType commandType, string commandText) |
Executes the commandText interpreted as specified by 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. More... | |
virtual object | ExecuteScalar (DbCommand command) |
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. More... | |
virtual object | ExecuteScalar (DbCommand command, DbTransaction transaction) |
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. More... | |
virtual object | ExecuteScalar (DbTransaction transaction, string storedProcedureName, params object[] parameterValues) |
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. More... | |
virtual object | ExecuteScalar (CommandType commandType, string commandText) |
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. More... | |
virtual object | ExecuteScalar (DbTransaction transaction, CommandType commandType, string commandText) |
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. More... | |
DbDataAdapter | GetDataAdapter () |
Gets a DbDataAdapter with Standard update behavior. More... | |
virtual object | GetParameterValue (DbCommand command, string name) |
Gets a parameter value. More... | |
DbCommand | GetSqlStringCommand (string query) |
Creates a DbCommand for a SQL query. More... | |
virtual void | AssignParameters (DbCommand command, object[] parameterValues) |
Discovers parameters on the command and assigns the values from parameterValues to the command s Parameters list. More... | |
DbCommand | GetStoredProcCommandWithSourceColumns (string storedProcedureName, params string[] sourceColumns) |
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. More... | |
virtual void | LoadDataSet (DbCommand command, DataSet dataSet, string tableName) |
Executes the command and adds a new DataTable to the existing DataSet. More... | |
virtual void | LoadDataSet (DbCommand command, DataSet dataSet, string tableName, DbTransaction transaction) |
Executes the command within the given transaction and adds a new DataTable to the existing DataSet. More... | |
virtual void | LoadDataSet (DbCommand command, DataSet dataSet, string[] tableNames) |
Loads a DataSet from a DbCommand. More... | |
virtual void | LoadDataSet (DbCommand command, DataSet dataSet, string[] tableNames, DbTransaction transaction) |
Loads a DataSet from a DbCommand in a transaction. More... | |
virtual void | LoadDataSet (DbTransaction transaction, string storedProcedureName, DataSet dataSet, string[] tableNames, params object[] parameterValues) |
Loads a DataSet with the results returned from a stored procedure executed in a transaction. More... | |
virtual void | LoadDataSet (CommandType commandType, string commandText, DataSet dataSet, string[] tableNames) |
Loads a DataSet from command text. More... | |
void | LoadDataSet (DbTransaction transaction, CommandType commandType, string commandText, DataSet dataSet, string[] tableNames) |
Loads a DataSet from command text in a transaction. More... | |
virtual void | SetParameterValue (DbCommand command, string parameterName, object value) |
Sets a parameter value. More... | |
int | UpdateDataSet (DataSet dataSet, string tableName, DbCommand insertCommand, DbCommand updateCommand, DbCommand deleteCommand, UpdateBehavior updateBehavior, int? updateBatchSize) |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet. More... | |
int | UpdateDataSet (DataSet dataSet, string tableName, DbCommand insertCommand, DbCommand updateCommand, DbCommand deleteCommand, UpdateBehavior updateBehavior) |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet. More... | |
int | UpdateDataSet (DataSet dataSet, string tableName, DbCommand insertCommand, DbCommand updateCommand, DbCommand deleteCommand, DbTransaction transaction, int? updateBatchSize) |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet within a transaction. More... | |
int | UpdateDataSet (DataSet dataSet, string tableName, DbCommand insertCommand, DbCommand updateCommand, DbCommand deleteCommand, DbTransaction transaction) |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet within a transaction. More... | |
virtual IAsyncResult | BeginExecuteNonQuery (DbCommand command, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the DbCommand which will return the number of affected records. More... | |
virtual IAsyncResult | BeginExecuteNonQuery (DbCommand command, DbTransaction transaction, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the DbCommand inside a transaction which will return the number of affected records. More... | |
virtual IAsyncResult | BeginExecuteNonQuery (string storedProcedureName, AsyncCallback callback, object state, params object[] parameterValues) |
Initiates the asynchronous execution of the storedProcedureName using the given parameterValues which will return the number of rows affected. More... | |
virtual IAsyncResult | BeginExecuteNonQuery (DbTransaction transaction, string storedProcedureName, AsyncCallback callback, object state, params object[] parameterValues) |
Initiates the asynchronous execution of the storedProcedureName using the given parameterValues inside a transaction which will return the number of rows affected. More... | |
virtual IAsyncResult | BeginExecuteNonQuery (CommandType commandType, string commandText, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return the number of rows affected. More... | |
virtual IAsyncResult | BeginExecuteNonQuery (DbTransaction transaction, CommandType commandType, string commandText, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside a transaction which will return the number of rows affected. More... | |
virtual int | EndExecuteNonQuery (IAsyncResult asyncResult) |
Finishes asynchronous execution of a SQL statement, returning the number of affected records. More... | |
virtual IAsyncResult | BeginExecuteReader (DbCommand command, AsyncCallback callback, object state) |
Initiates the asynchronous execution of a command which will return a IDataReader. More... | |
virtual IAsyncResult | BeginExecuteReader (DbCommand command, DbTransaction transaction, AsyncCallback callback, object state) |
Initiates the asynchronous execution of a command inside a transaction which will return a IDataReader. More... | |
virtual IAsyncResult | BeginExecuteReader (string storedProcedureName, AsyncCallback callback, object state, params object[] parameterValues) |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues which will return a IDataReader. More... | |
virtual IAsyncResult | BeginExecuteReader (DbTransaction transaction, string storedProcedureName, AsyncCallback callback, object state, params object[] parameterValues) |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues inside a transaction which will return a IDataReader. More... | |
virtual IAsyncResult | BeginExecuteReader (CommandType commandType, string commandText, AsyncCallback callback, object state) |
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. More... | |
virtual IAsyncResult | BeginExecuteReader (DbTransaction transaction, CommandType commandType, string commandText, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside an transaction which will return a IDataReader. More... | |
virtual IDataReader | EndExecuteReader (IAsyncResult asyncResult) |
Finishes asynchronous execution of a Transact-SQL statement, returning an IDataReader. More... | |
virtual IAsyncResult | BeginExecuteScalar (DbCommand command, AsyncCallback callback, object state) |
Initiates the asynchronous execution of a command which will return a single value. More... | |
virtual IAsyncResult | BeginExecuteScalar (DbCommand command, DbTransaction transaction, AsyncCallback callback, object state) |
Initiates the asynchronous execution of a command inside a transaction which will return a single value. More... | |
virtual IAsyncResult | BeginExecuteScalar (string storedProcedureName, AsyncCallback callback, object state, params object[] parameterValues) |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues which will return a single value. More... | |
virtual IAsyncResult | BeginExecuteScalar (DbTransaction transaction, string storedProcedureName, AsyncCallback callback, object state, params object[] parameterValues) |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues inside a transaction which will return a single value. More... | |
virtual IAsyncResult | BeginExecuteScalar (CommandType commandType, string commandText, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return a single value. More... | |
virtual IAsyncResult | BeginExecuteScalar (DbTransaction transaction, CommandType commandType, string commandText, AsyncCallback callback, object state) |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside an transaction which will return a single value. More... | |
virtual object | EndExecuteScalar (IAsyncResult asyncResult) |
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. More... | |
Static Public Member Functions | |
static void | ClearParameterCache () |
Clears the parameter cache. Since there is only one parameter cache that is shared by all instances of this class, this clears all parameters cached for all databases. More... | |
Protected Member Functions | |
override DatabaseConnectionWrapper | GetWrappedConnection () |
Gets a "wrapped" connection for use outside a transaction. More... | |
override void | DeriveParameters (DbCommand discoveryCommand) |
Don't need an implementation for SQL Server CE. More... | |
override void | SetUpRowUpdatedEvent (DbDataAdapter adapter) |
Sets the RowUpdated event for the data adapter. More... | |
void | AddParameters (DbCommand command, params DbParameter[] parameters) |
Adds any parameters to the command. More... | |
virtual void | ConfigureParameter (DbParameter param, string name, DbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value) |
Configures a given DbParameter. More... | |
DbParameter | CreateParameter (string name, DbType dbType, int size, ParameterDirection direction, bool nullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value) |
Adds a new instance of a DbParameter object. More... | |
DbParameter | CreateParameter (string name) |
Creates a new instance of a DbParameter object. More... | |
int | DoExecuteNonQuery (DbCommand command) |
Executes the query for command . More... | |
virtual IDataReader | CreateWrappedReader (DatabaseConnectionWrapper connection, IDataReader innerReader) |
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. More... | |
DbDataAdapter | GetDataAdapter (UpdateBehavior updateBehavior) |
Gets the DbDataAdapter with the given update behavior and connection from the proper derived class. More... | |
DatabaseConnectionWrapper | 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. More... | |
virtual bool | SameNumberOfParametersAndValues (DbCommand command, object[] values) |
Determines if the number of parameters in the command matches the array of parameter values. More... | |
virtual int | UserParametersStartIndex () |
Returns the starting index for parameters in a command. More... | |
Static Protected Member Functions | |
static void | PrepareCommand (DbCommand command, DbConnection connection) |
Assigns a connection to the command and discovers parameters if needed. More... | |
static void | PrepareCommand (DbCommand command, DbTransaction transaction) |
Assigns a transaction to the command and discovers parameters if needed. More... | |
Properties | |
char | ParameterToken [get] |
Gets the parameter token used to delimit parameters for the SQL Server database. More... | |
string | ConnectionString [get] |
Gets the string used to open a database. More... | |
string | ConnectionStringNoCredentials [get] |
Gets the connection string without the username and password. More... | |
string | ConnectionStringWithoutCredentials [get] |
Gets the connection string without credentials. More... | |
DbProviderFactory | DbProviderFactory [get] |
Gets the DbProviderFactory used by the database instance. More... | |
virtual bool | SupportsParemeterDiscovery [get] |
Does this Database object support parameter discovery? More... | |
virtual bool | SupportsAsync [get] |
Does this Database object support asynchronous execution? More... | |
Provides helper methods to make working with a Sql Server Compact Edition database easier.
Because SQL Server CE has no connection pooling and the cost of opening the initial connection is high, this class implements a simple connection pool.
SQL Server CE requires full trust to run, so it cannot be used in partial-trust environments.
Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.SqlCeDatabase.SqlCeDatabase | ( | string | connectionString | ) |
Initializes a new instance of the SqlCeDatabase class with a connection string.
connectionString | The connection string. |
|
inherited |
Adds new In/Out DbParameter object to given command
command | The command to add the in/out parameter. |
name | The name of the parameter |
dbType | One of the DbType values. |
size | The maximum size of the data within the column. |
value | The value of the parameter for In direction. |
|
inherited |
Adds new In/Out DbParameter object to given command
command | The command to add the in/out parameter. |
name | The name of the parameter |
dbType | One of the DbType values. |
value | The value of the parameter for In direction. |
|
inherited |
Adds a new In DbParameter object to the given command .
command | The command to add the in parameter. |
name | The name of the parameter. |
dbType | One of the DbType values. |
This version of the method is used when you can have the same parameter object multiple times with different values.
|
inherited |
Adds a new In DbParameter object to the given command .
command | The command to add the parameter. |
name | The name of the parameter. |
dbType | One of the DbType values. |
value | The value of the parameter. |
|
inherited |
Adds a new In DbParameter object to the given command .
command | The command to add the parameter. |
name | The name of the parameter. |
dbType | One of the DbType values. |
sourceColumn | The name of the source column mapped to the DataSet and used for loading or returning the value. |
sourceVersion | One of the DataRowVersion values. |
|
inherited |
Adds a new Out DbParameter object to the given command .
command | The command to add the out parameter. |
name | The name of the parameter. |
dbType | One of the DbType values. |
size | The maximum size of the data within the column. |
|
virtualinherited |
Adds a new In DbParameter object to the given command .
command | The command to add the parameter. |
name | The name of the parameter. |
dbType | One of the DbType values. |
size | The maximum size of the data within the column. |
direction | One of the ParameterDirection values. |
nullable | A value indicating whether the parameter accepts null (Nothing in Visual Basic) values. |
precision | The maximum number of digits used to represent the value . |
scale | The number of decimal places to which value is resolved. |
sourceColumn | The name of the source column mapped to the DataSet and used for loading or returning the value . |
sourceVersion | One of the DataRowVersion values. |
value | The value of the parameter. |
ArgumentNullException | command is null. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
inherited |
Adds a new instance of a DbParameter object to the command.
command | The command to add the parameter. |
name | The name of the parameter. |
dbType | One of the DbType values. |
direction | One of the ParameterDirection values. |
sourceColumn | The name of the source column mapped to the DataSet and used for loading or returning the value . |
sourceVersion | One of the DataRowVersion values. |
value | The value of the parameter. |
ArgumentNullException | command is null. |
|
protected |
Adds any parameters to the command.
command | The command object you want prepared. |
parameters | Zero or more parameters to add to the command. |
|
virtualinherited |
Discovers parameters on the command and assigns the values from parameterValues to the command s Parameters list.
command | The command the parameter values will be assigned to |
parameterValues | The parameter values that will be assigned to the command. |
InvalidOperationException | The number of parameters in parameterValues does not match the number of parameters in command . |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return the number of rows affected.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the DbCommand which will return the number of affected records.
command | The DbCommand to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the DbCommand inside a transaction which will return the number of affected records.
command | The DbCommand to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside a transaction which will return the number of rows affected.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the storedProcedureName using the given parameterValues inside a transaction which will return the number of rows affected.
storedProcedureName | The name of the stored procedure to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the storedProcedureName using the given parameterValues which will return the number of rows affected.
storedProcedureName | The name of the stored procedure to execute. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
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.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
callback | AsyncCallback to execute when the async operation completes. |
state | State object passed to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of a command which will return a IDataReader.
command | The DbCommand to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of a command inside a transaction which will return a IDataReader.
command | The DbCommand to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside an transaction which will return a IDataReader.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues inside a transaction which will return a IDataReader.
transaction | The DbTransaction to execute the command within. |
storedProcedureName | The name of the stored procedure to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues which will return a IDataReader.
storedProcedureName | The name of the stored procedure to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType which will return a single value.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of a command which will return a single value.
command | The DbCommand to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of a command inside a transaction which will return a single value.
command | The DbCommand to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of the commandText interpreted as specified by the commandType inside an transaction which will return a single value.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
transaction | The DbTransaction to execute the command within. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues inside a transaction which will return a single value.
transaction | The DbTransaction to execute the command within. |
storedProcedureName | The name of the stored procedure to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Initiates the asynchronous execution of storedProcedureName using the given parameterValues which will return a single value.
storedProcedureName | The name of the stored procedure to execute. |
callback | The async callback to execute when the result of the operation is available. Pass <langword>null</langword> if you don't want to use a callback. |
state | Additional state object to pass to the callback. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtual |
Builds a value parameter name for the current database.
name | The name of the parameter. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
staticinherited |
Clears the parameter cache. Since there is only one parameter cache that is shared by all instances of this class, this clears all parameters cached for all databases.
void Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.SqlCeDatabase.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.
|
protectedvirtualinherited |
Configures a given DbParameter.
param | The DbParameter to configure. |
name | The name of the parameter. |
dbType | One of the DbType values. |
size | The maximum size of the data within the column. |
direction | One of the ParameterDirection values. |
nullable | A value indicating whether the parameter accepts null (Nothing in Visual Basic) values. |
precision | The maximum number of digits used to represent the value . |
scale | The number of decimal places to which value is resolved. |
sourceColumn | The name of the source column mapped to the DataSet and used for loading or returning the value . |
sourceVersion | One of the DataRowVersion values. |
value | The value of the parameter. |
|
virtual |
Creates a connection for this database.
This method has been overridden to support keeping a single connection open until you explicitly close it with a call to CloseSharedConnection.
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
void Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.SqlCeDatabase.CreateFile | ( | ) |
Creates a new, empty database file using the file name provided in the Data Source attribute of the connection string.
|
protectedinherited |
Creates a new instance of a DbParameter object.
name | The name of the parameter. |
|
protectedinherited |
Adds a new instance of a DbParameter object.
name | The name of the parameter. |
dbType | One of the DbType values. |
size | The maximum size of the data within the column. |
direction | One of the ParameterDirection values. |
nullable | A value indicating whether the parameter accepts null (Nothing in Visual Basic) values. |
precision | The maximum number of digits used to represent the value . |
scale | The number of decimal places to which value is resolved. |
sourceColumn | The name of the source column mapped to the DataSet and used for loading or returning the value . |
sourceVersion | One of the DataRowVersion values. |
value | The value of the parameter. |
|
virtual |
Creates a new parameter and sets the name of the parameter.
name | The name of the parameter. |
type | The type of the parameter. |
size | The size of the parameter. |
value | The value you want to assign to the parameter. A null value will be converted to a DBNull value in the parameter. |
The database will automatically add the correct prefix (for example, "@" for SQL Server) to the parameter name. You can just supply the name without a prefix.
|
protectedvirtualinherited |
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.
connection | Connection + refcount. |
innerReader | The reader to wrap. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
protectedvirtual |
Don't need an implementation for SQL Server CE.
discoveryCommand |
Implements Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
inherited |
Discovers the parameters for a DbCommand.
command | The DbCommand to discover the parameters. |
You should get the value of SupportsParemeterDiscovery to detect if parameter discovery is supported for your database provider type.
|
protectedinherited |
Executes the query for command .
command | The DbCommand representing the query to execute. |
|
virtualinherited |
Finishes asynchronous execution of a SQL statement, returning the number of affected records.
asyncResult | The IAsyncResult returned by a call to any overload of BeginExecuteNonQuery(DbCommand, AsyncCallback, object). |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Finishes asynchronous execution of a Transact-SQL statement, returning an IDataReader.
asyncResult | The IAsyncResult returned by a call to any overload of BeginExecuteReader. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
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.
asyncResult | The IAsyncResult returned by a call to any overload of BeginExecuteScalar. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase.
|
virtualinherited |
Executes the commandText interpreted as specified by the commandType and returns the results in a new DataSet.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
Executes the command and returns the results in a new DataSet.
command | The DbCommand to execute. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
virtualinherited |
Executes the command as part of the transaction and returns the results in a new DataSet.
command | The DbCommand to execute. |
transaction | The IDbTransaction to execute the command within. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
virtualinherited |
Executes the commandText as part of the given transaction and returns the results in a new DataSet.
transaction | The IDbTransaction to execute the command within. |
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
Executes the storedProcedureName with parameterValues as part of the transaction and returns the results in a new DataSet within a transaction.
transaction | The IDbTransaction to execute the command within. |
storedProcedureName | The stored procedure to execute. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
|
virtual |
Stored procedures are not supported in SQL Server CE.
storedProcedureName | |
parameterValues |
NotImplementedException | In all cases. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
virtual |
Executes a SQL SELECT statement and returns a dataset.
sqlCommand | |
parameters |
|
virtualinherited |
Executes the commandText interpreted as specified by the commandType and returns the number of rows affected.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
Executes the command and returns the number of rows affected.
command | The command that contains the query to execute. |
|
virtualinherited |
Executes the command within the given transaction , and returns the number of rows affected.
command | The command that contains the query to execute. |
transaction | The IDbTransaction to execute the command within. |
|
virtualinherited |
Executes the commandText interpreted as specified by the commandType as part of the given transaction and returns the number of rows affected.
transaction | The IDbTransaction to execute the command within. |
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
Executes the storedProcedureName using the given parameterValues within a transaction and returns the number of rows affected.
transaction | The IDbTransaction to execute the command within. |
storedProcedureName | The name of the stored procedure to execute. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
|
virtual |
Stored procedures are not supported in SQL Server CE.
storedProcedureName | |
parameterValues |
NotImplementedException | In all cases. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
virtual |
Executes an INSERT statement and given the identity of the row that was inserted for identity tables.
sqlCommand | The SQL statement to execute. |
lastAddedId | The identity value for the last row added, or DBNull. |
parameters | Zero or more parameters. |
|
virtual |
Executes a SQL statement directly, because SQL Server CE doesn't support stored procedures.
sqlCommand | The SQL statement to execute. |
parameters | An optional set of parameters and values. |
|
inherited |
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.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
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.
command | The command that contains the query to execute. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
virtualinherited |
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.
command | The command that contains the query to execute. |
transaction | The IDbTransaction to execute the command within. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
inherited |
Executes the commandText interpreted as specified by 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.
transaction | The IDbTransaction to execute the command within. |
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
inherited |
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.
transaction | The IDbTransaction to execute the command within. |
storedProcedureName | The command that contains the query to execute. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
|
inherited |
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.
storedProcedureName | The command that contains the query to execute. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
|
virtual |
Executes a command and returns a DbDataReader that contains the rows returned.
sqlCommand | The SQL query to execute. |
parameters | Zero or more parameters for the query. |
|
virtual |
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.
Unlike other Execute... methods that take a DbCommand instance, this method does not set the command behavior to close the connection when you close the reader. That means you'll need to close the connection yourself, by calling the command.Connection.Close() method after you're finished using the reader.
command | The command that contains the SQL SELECT statement to execute. |
transaction | Transaction to execute the command under. |
parameters | An option set of DbParameter parameters. |
|
virtual |
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.
Unlike other Execute... methods that take a DbCommand instance, this method does not set the command behavior to close the connection when you close the reader. That means you'll need to close the connection yourself, by calling the command.Connection.Close() method after you're finished using the reader.
command | The command that contains the SQL SELECT statement to execute. |
transaction | Transaction to execute the command under. |
options | Controls how the SqlCeResultSet behaves. |
parameters | An option set of DbParameter parameters. |
|
virtual |
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.
The SqlCeResultSet returned from this method will close the connection on dispose.
command | The command that contains the SQL SELECT statement to execute. |
parameters | An option set of DbParameter parameters. |
|
virtual |
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.
The SqlCeResultSet returned from this method will close the connection on dispose.
command | The command that contains the SQL SELECT statement to execute. |
options | Controls how the SqlCeResultSet behaves. |
parameters | An option set of DbParameter parameters. |
|
virtualinherited |
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.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
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.
command | The command that contains the query to execute. |
|
virtualinherited |
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.
command | The command that contains the query to execute. |
transaction | The IDbTransaction to execute the command within. |
|
virtualinherited |
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.
transaction | The IDbTransaction to execute the command within. |
commandType | One of the CommandType values. |
commandText | The command text to execute. |
|
virtualinherited |
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.
transaction | The IDbTransaction to execute the command within. |
storedProcedureName | The stored procedure to execute. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
|
virtual |
Stored procedures are not supported in SQL Server CE.
storedProcedureName | |
parameterValues |
NotImplementedException | In all cases. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
virtual |
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.
sqlCommand | The SQL statement to execute. |
parameters | Zero or more parameters for the query. |
|
inherited |
Gets a DbDataAdapter with Standard update behavior.
Created this new, public method instead of modifying the protected, abstract one so that there will be no breaking changes for any currently derived Database class.
|
protectedinherited |
Gets the DbDataAdapter with the given update behavior and connection from the proper derived class.
updateBehavior | One of the UpdateBehavior values. |
|
protectedinherited |
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.
|
virtualinherited |
Gets a parameter value.
command | The command that contains the parameter. |
name | The name of the parameter. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
inherited |
Creates a DbCommand for a SQL query.
query | The text of the query. |
ArgumentException | query is null or empty. |
|
virtual |
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.
storedProcedureName | The SQL statement to execute. |
NotImplementedException | In all cases. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
virtual |
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.
storedProcedureName | |
parameterValues |
NotImplementedException | In all cases. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
inherited |
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.
storedProcedureName | The name of the stored procedure. |
sourceColumns | The list of DataFields for the procedure. |
|
protectedvirtual |
Gets a "wrapped" connection for use outside a transaction.
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
virtualinherited |
Loads a DataSet from command text.
commandType | One of the CommandType values. |
commandText | The command text to execute. |
dataSet | The DataSet to fill. |
tableNames | An array of table name mappings for the DataSet. |
|
virtualinherited |
Executes the command and adds a new DataTable to the existing DataSet.
command | The DbCommand to execute. |
dataSet | The DataSet to load. |
tableName | The name for the new DataTable to add to the DataSet. |
System.ArgumentNullException | Any input parameter was null (Nothing in Visual Basic) |
System.ArgumentException | tableName was an empty string |
|
virtualinherited |
Executes the command within the given transaction and adds a new DataTable to the existing DataSet.
command | The DbCommand to execute. |
dataSet | The DataSet to load. |
tableName | The name for the new DataTable to add to the DataSet. |
transaction | The IDbTransaction to execute the command within. |
System.ArgumentNullException | Any input parameter was null (Nothing in Visual Basic). |
System.ArgumentException | tableName was an empty string. |
|
virtualinherited |
Loads a DataSet from a DbCommand.
command | The command to execute to fill the DataSet. |
dataSet | The DataSet to fill. |
tableNames | An array of table name mappings for the DataSet. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
virtualinherited |
Loads a DataSet from a DbCommand in a transaction.
command | The command to execute to fill the DataSet. |
dataSet | The DataSet to fill. |
tableNames | An array of table name mappings for the DataSet. |
transaction | The IDbTransaction to execute the command in. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
inherited |
Loads a DataSet from command text in a transaction.
transaction | The IDbTransaction to execute the command in. |
commandType | One of the CommandType values. |
commandText | The command text to execute. |
dataSet | The DataSet to fill. |
tableNames | An array of table name mappings for the DataSet. |
|
virtualinherited |
Loads a DataSet with the results returned from a stored procedure executed in a transaction.
transaction | The IDbTransaction to execute the stored procedure in. |
storedProcedureName | The stored procedure name to execute. |
dataSet | The DataSet to fill. |
tableNames | An array of table name mappings for the DataSet. |
parameterValues | An array of parameters to pass to the stored procedure. The parameter values must be in call order as they appear in the stored procedure. |
|
virtual |
Stored procedures are not supported in SQL Server CE.
storedProcedureName | |
dataSet | |
tableNames | |
parameterValues |
NotImplementedException | In all cases. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
staticprotectedinherited |
Assigns a connection to the command and discovers parameters if needed.
command | The command that contains the query to prepare. |
connection | The connection to assign to the command. |
|
staticprotectedinherited |
Assigns a transaction to the command and discovers parameters if needed.
command | The command that contains the query to prepare. |
transaction | The transaction to assign to the command. |
|
protectedvirtualinherited |
Determines if the number of parameters in the command matches the array of parameter values.
command | The DbCommand containing the parameters. |
values | The array of parameter values. |
true
if the number of parameters and values match; otherwise, false
.Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, and Microsoft.Practices.EnterpriseLibrary.Data.OleDb.OleDbDatabase.
|
virtualinherited |
Sets a parameter value.
command | The command with the parameter. |
parameterName | The parameter name. |
value | The parameter value. |
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase.
|
protectedvirtual |
Sets the RowUpdated event for the data adapter.
adapter | The DbDataAdapter to set the event. |
Reimplemented from Microsoft.Practices.EnterpriseLibrary.Data.Database.
|
virtual |
Checks to see if a table exists in the open database.
tableName | Name of the table. |
|
inherited |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet within a transaction.
dataSet | The DataSet used to update the data source. |
tableName | The name of the source table to use for table mapping. |
insertCommand | The DbCommand executed when DataRowState is DataRowState.Added. |
updateCommand | The DbCommand executed when DataRowState is DataRowState.Modified. |
deleteCommand | The DbCommand executed when DataRowState is DataRowState.Deleted. |
transaction | The IDbTransaction to use. |
|
inherited |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet within a transaction.
dataSet | The DataSet used to update the data source. |
tableName | The name of the source table to use for table mapping. |
insertCommand | The DbCommand executed when DataRowState is DataRowState.Added. |
updateCommand | The DbCommand executed when DataRowState is DataRowState.Modified. |
deleteCommand | The DbCommand executed when DataRowState is DataRowState.Deleted. |
transaction | The IDbTransaction to use. |
updateBatchSize | The number of commands that can be executed in a single call to the database. Set to 0 to use the largest size the server can handle, 1 to disable batch updates, and anything else to set the number of rows. |
|
inherited |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet.
dataSet | The DataSet used to update the data source. |
tableName | The name of the source table to use for table mapping. |
insertCommand | The DbCommand executed when DataRowState is DataRowState.Added |
updateCommand | The DbCommand executed when DataRowState is DataRowState.Modified |
deleteCommand | The DbCommand executed when DataRowState is DataRowState.Deleted |
updateBehavior | One of the UpdateBehavior values. |
|
inherited |
Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet.
dataSet | The DataSet used to update the data source. |
tableName | The name of the source table to use for table mapping. |
insertCommand | The DbCommand executed when DataRowState is DataRowState.Added |
updateCommand | The DbCommand executed when DataRowState is DataRowState.Modified |
deleteCommand | The DbCommand executed when DataRowState is DataRowState.Deleted |
updateBehavior | One of the UpdateBehavior values. |
updateBatchSize | The number of database commands to execute in a batch. |
|
protectedvirtualinherited |
Returns the starting index for parameters in a command.
Reimplemented in Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, and Microsoft.Practices.EnterpriseLibrary.Data.OleDb.OleDbDatabase.
|
getinherited |
Gets the string used to open a database.
The string used to open a database.
|
getprotectedinherited |
Gets the connection string without the username and password.
The connection string without the username and password.
|
getinherited |
Gets the connection string without credentials.
The connection string without credentials.
|
getinherited |
Gets the DbProviderFactory used by the database instance.
|
getprotected |
Gets the parameter token used to delimit parameters for the SQL Server database.
The "@" symbol.
|
getinherited |
Does this Database object support asynchronous execution?
Base class always returns false.
|
getinherited |
Does this Database object support parameter discovery?
Base class always returns false.