QuickObjects.DBLibrary Send comments on this topic.
DBConnection Property
See Also 
Akal.QuickObjects.DBLibrary Namespace > DatabaseObjectSQL Class : DBConnection Property

DBConnection

Holds any IDbConnection object. This is autmatically created based on the DBType selection.

If the DBType is set to SQL Server 2000 or SQL 2005, this property will be assigned a SqlConnection object, but if the DBType is set to Oracle 8i, 9i or 10g this property will be assigned an OracleConnection.

If you like to manually set the connection you can do so as well as Int64 as the underlying database type remains the same as the value of DBType.


myBusiessObj.DBType = DBTypes.Sql2005;
myBusinessObj.DBConnection = new SqlConnection();

Or


myBusinessObj.DBType = DBTypes.Oracle10g;
myBusinessObj.DBConnection = new OracleConnection();

NOTE: This property is not NonSerializable and it is also ignored during Xml Serialization.

Syntax

C# 
[XmlIgnoreAttribute()]
public IDbConnection DBConnection {get; set;}

Requirements

Target Platforms: .NET Framework 1.1 or .NET Framework 2.0

See Also