Jaa


Database Members

Include Protected Members
Include Inherited Members

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The Database type exposes the following members.

Constructors

  Name Description
Protected method Database
Initializes a new instance of the Database class with a connection string and a DbProviderFactory.

Methods

  Name Description
Public method AddInParameter Overloaded.
Public method AddOutParameter
Adds a new Out DbParameter object to the given command.
Public method AddParameter Overloaded.
Public method BuildParameterName
Builds a value parameter name for the current database.
Public methodStatic member 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.
Protected method ConfigureParameter
Configures a given DbParameter.
Public method CreateConnection

Creates a connection for this database.

Protected method CreateParameter Overloaded.
Protected method DeriveParameters
Retrieves parameter information from the stored procedure specified in the DbCommand and populates the Parameters collection of the specified DbCommand object.
Public method DiscoverParameters
Discovers the parameters for a DbCommand.
Protected method DoExecuteNonQuery
Executes the query for command.
Public method Equals (Inherited from Object.)
Public method ExecuteDataSet Overloaded.
Public method ExecuteNonQuery Overloaded.
Public method ExecuteReader Overloaded.
Public method ExecuteScalar Overloaded.
Protected method Finalize (Inherited from Object.)
Public method GetDataAdapter Overloaded.
Public method GetHashCode (Inherited from Object.)
Public method GetInstrumentationEventProvider
Returns the object to which the instrumentation events have been delegated.
Protected method GetOpenConnection Overloaded.
Public method GetParameterValue
Gets a parameter value.
Public method GetSqlStringCommand

Creates a DbCommand for a SQL query.

Public method GetStoredProcCommand Overloaded.
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.
Public method GetType (Inherited from Object.)
Public method LoadDataSet Overloaded.
Protected method MemberwiseClone (Inherited from Object.)
Protected method OpenConnection Obsolete.

Opens a connection.

Protected methodStatic member PrepareCommand Overloaded.
Protected method SameNumberOfParametersAndValues
Determines if the number of parameters in the command matches the array of parameter values.
Public method SetParameterValue
Sets a parameter value.
Protected method SetUpRowUpdatedEvent
Sets the RowUpdated event for the data adapter.
Public method ToString (Inherited from Object.)
Public method UpdateDataSet Overloaded.
Protected method UserParametersStartIndex
Returns the starting index for parameters in a command.

Fields

  Name Description
Protected field instrumentationProvider
The DataInstrumentationProvider instance that defines the logical events used to instrument this Database instance.

Properties

  Name Description
Protected property ConnectionString

Gets the string used to open a database.

Protected property ConnectionStringNoCredentials

Gets the connection string without the username and password.

Public property ConnectionStringWithoutCredentials
Gets the connection string without credentials.
Public property DbProviderFactory

Gets the DbProviderFactory used by the database instance.

See Also

Database Class

Microsoft.Practices.EnterpriseLibrary.Data Namespace

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.