This document is provided on an "AS IS" basis without warranties of any kind. Smartsite iXperion class libraries may change in future releases.

Syntax

C# Copy imageCopy Code
                                  public abstract class Database
Visual Basic (Declaration) Copy imageCopy Code
                                  Public MustInherit Class Database

The type exposes the following members.

Public Methods

  Name Description
Public method Static member ConvertSqlServerTypeToNativeType
Converts the SqlServer type to the .Net native's type.
Public method CreateAdapter
Creates an IDbDataAdapter instance for the current database server.
Public method CreateCommand Overloaded.
Public method CreateConnection
Create an IDbConnection instance for the current database server.
Public method Static member CreateDatabase Overloaded.
Public method CreatePagingQuery
Modifies the sql query into a query that uses paging.
Public method CreateParameter Overloaded.
Public method Equals (Inherited from Object.)
Public method ExecuteNonQuery Overloaded.
Public method ExecuteReader Overloaded.
Public method ExecuteScalar Overloaded.
Public method ExecuteStoredProcedure
Executes a stored procedure. The query parameters must be named parameters. The result is a datatable that contains all the output parameters and their values of the stored procedure.
Public method Static member GetById
Gets the Database that belongs to the given id which is defined in Smartsite.data.config.
Public method GetCommand Overloaded.
Public method GetHashCode (Inherited from Object.)
Public method GetIdentity Overloaded.
Public method GetParameterName
Returns a string containing the modified parameterName, matching the current database format.
Public method GetType (Inherited from Object.)
Public method NotifyAllTablesChanged
Notify this Database object that all the tables in the database have changed. This is useful when an unknown set of tables has been changed or when someone wants all the caches to be flushed.
Public method NotifyTableChanged Overloaded.
Public method Static member PreloadAsync
Asynchronously preloads the default database factory provider.
Public method PreparseQuery Overloaded.
Public method SetIdentityInsertOnOff
Sets the identity insert on or off.
Public method ToString (Inherited from Object.)

Protected Methods

  Name Description
Protected method CreateConnectionBase
Creates a new connection.
Protected method CreateMetaXml
Creates an Xml document containing a description of the database.
Protected method ExecuteInternal
Executes the query
Protected method Finalize (Inherited from Object.)
Protected method GetCachedParsedQuery
Returns the cached parsed query from cache or null otherwise.
Protected method GetObjectId Overloaded.
Protected method LogExecute Overloaded.
Protected method MakeDbNullable<(Of <<'(T>)>>)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnAfterExecuteStoredProcedure
Execeted after a stored procedure has been executed. This method can be used to modify the result.
Protected method OnBeforeExecuteStoredProcedure
Executed before a stored procedure has been executed. This method can be used to modify the command object.
Protected method PreparseParameterizedQuery Overloaded.
Protected method SetCachedParsedQuery
Adds the parsed query to the cache.
Protected method SplitQueryOnParameters
Splits a parameterized query on the '?' symbol, ignoring any question marks in strings or comments. This method can be used by inheritors who must replace the '?' symbol by something else because their providers need that.
Protected method SplitSqlStatements
Splits the sql statement in multiple statements.

Public Fields

  Name Description
Public field Static member DynamicDatabaseConnections
String for Dynamic Connections.

Public Properties

  Name Description
Public property Static member ApplicationName
Gets or sets the application name that is reported on the database connection. (Visible in Sql Traces).
Public property ConnectionString
Returns the connection string.
Public property Static member Current
Returns the default database of the current user.
Public property Id
Returns the Id of this database
Public property IsCmsDatabase
Gets if this database is a CMS database. Once set to true, isCmsDatabase can never be set to false again.
Public property Meta
Returns meta information about this database.
Public property ProviderName
Gets the provider invariant name.
Public property ServerType
Returns the database server type.
Public property ServerVersion
Gets the dbms version.
Public property TableCache
Returns the TableCacheManager for this Database.

Protected Properties

  Name Description
Protected property CustomVwSchemaProcedureParameters
Returns the sql query that retrieves data normally returned by VwSchemaProcedureParameters. This sql query is used for non-Cms databases when vwSchemaTables does not exist.
Protected property CustomVwSchemaProcedures
Returns the sql query that retrieves data normally returned by vwSchemaTables. This sql query is used for non-Cms databases when vwSchemaTables does not exist.
Protected property CustomVwSchemaTables
Returns the sql query that retrieves data normally returned by vwSchemaTables. This sql query is used for non-Cms databases when vwSchemaTables does not exist.
Protected property Factory
Gets the factory for this database.
Protected property ParsedConnectionString
Gets the parsed connection string.

Public Events

  Name Description
Public event TableChanged
Event that is raised when a row in a table in this database is changed.

See Also

Advanced