Class DatabaseInfo
DatabaseInfo stores information about database connectivity, a Report have a collection of connection definitions. Each connection can use diferent connectivity technology (database providers). ReportDatabaseInfos
Inherited Members
Namespace: Reportman.Reporting
Assembly: Reportman.Reporting.dll
Syntax
public class DatabaseInfo : ReportItem, IDisposable, ICloneable
Constructors
DatabaseInfo()
Constructor
Declaration
public DatabaseInfo()
Fields
CustomProviderFactories
Declaration
public static SortedList<string, DbProviderFactory> CustomProviderFactories
Field Value
| Type | Description |
|---|---|
| SortedList<string, DbProviderFactory> |
FIREBIRD_PROVIDER2
Declaration
public static string FIREBIRD_PROVIDER2
Field Value
| Type | Description |
|---|---|
| string |
MYSQL_PROVIDER
Declaration
public static string MYSQL_PROVIDER
Field Value
| Type | Description |
|---|---|
| string |
SQLITE_PROVIDER
Declaration
public static string SQLITE_PROVIDER
Field Value
| Type | Description |
|---|---|
| string |
SqlExecuter
Declaration
public IDbCommandExecuter SqlExecuter
Field Value
| Type | Description |
|---|---|
| IDbCommandExecuter |
TransIsolation
Default isolation level if a transaction have not assigned, all the querys related to this connection will run inside the same transaction
Declaration
public IsolationLevel TransIsolation
Field Value
| Type | Description |
|---|---|
| IsolationLevel |
Transaction
You can assign a transaction, so this transaction will be used instead a default created one
Declaration
public IDbTransaction Transaction
Field Value
| Type | Description |
|---|---|
| IDbTransaction |
Properties
Alias
DatabaseInfo item name
Declaration
public string Alias { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Connection
You can assign a Connection, so this connection will be used, if you provide a connection, all the settings inside DatabaseInfo related to perform connection will be ignored and all querys will be executed against the provided connection
Declaration
[JsonIgnore]
[JsonIgnore]
public IDbConnection Connection { get; set; }
Property Value
| Type | Description |
|---|---|
| IDbConnection |
ConnectionString
Connection string, for ADO and .Net drivers
Declaration
public string ConnectionString { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CurrentTransaction
Obtain current active transaction to execute querys
Declaration
[JsonIgnore]
[JsonIgnore]
public IDbTransaction CurrentTransaction { get; }
Property Value
| Type | Description |
|---|---|
| IDbTransaction |
DotNetDriver
DotNet driver type
Declaration
public DotNetDriverType DotNetDriver { get; set; }
Property Value
| Type | Description |
|---|---|
| DotNetDriverType |
Driver
DatabaseInfo driver type
Declaration
public DriverType Driver { get; set; }
Property Value
| Type | Description |
|---|---|
| DriverType |
ProviderFactory
Provider factory, only for .Net 2.x driver
Declaration
public string ProviderFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReportField
Report field when loading report items from a connection
Declaration
public string ReportField { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReportGroupsTable
Report groups table when loading report items from a connection
Declaration
public string ReportGroupsTable { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReportSearchField
Report search field when loading report items from a connection
Declaration
public string ReportSearchField { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ReportTable
Report table name when loading report items from a connection
Declaration
public string ReportTable { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Clone()
Clone the DatabaseInfo item
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| object | A new DatabaseInfo item with same data as the original |
Clone(Report)
Clone the DatabaseInfo item
Declaration
public DatabaseInfo Clone(Report areport)
Parameters
| Type | Name | Description |
|---|---|---|
| Report | areport | Report to assign to the item |
Returns
| Type | Description |
|---|---|
| DatabaseInfo | A new DatabaseInfo item with same data as the original |
Connect()
Connect to the database
Declaration
public void Connect()
DisConnect()
Disconnect from database, also dispose any transaction
Declaration
public void DisConnect()
GetClassName()
Internal function to determine the object type name
Declaration
protected override string GetClassName()
Returns
| Type | Description |
|---|---|
| string | Object type name |
Overrides
GetDataReaderFromSQL(string, string, Params, bool)
Obrains a IDataReader from a sql sentence
Declaration
public IDataReader GetDataReaderFromSQL(string sqlsentence, string dataalias, Params aparams, bool onlyexec)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sqlsentence | A valid sql sentence |
| string | dataalias | Parameters related to this alias will be used |
| Params | aparams | Report parameters |
| bool | onlyexec | Execute only, not open the query |
Returns
| Type | Description |
|---|---|
| IDataReader | A valid IDataReader |
GetDriverDescriptions()
Declaration
public static List<string> GetDriverDescriptions()
Returns
| Type | Description |
|---|---|
| List<string> |