Knight Data Access Layer
DataHelper Constructor(BaseDatabaseProvider)
Example 




KellermanSoftware.NetDataAccessLayer Namespace > DataHelper Class > DataHelper Constructor : DataHelper Constructor(BaseDatabaseProvider)
Database Provider
Initialize the DataHelper with the Database Provider
Syntax
Public Function New( _
   ByVal provider As BaseDatabaseProvider _
)
Dim provider As BaseDatabaseProvider
 
Dim instance As New DataHelper(provider)
public DataHelper( 
   BaseDatabaseProvider provider
)
public: DataHelper( 
   BaseDatabaseProvider* provider
)
public:
DataHelper( 
   BaseDatabaseProvider^ provider
)

Parameters

provider
Database Provider
Example
//New up the provider for what database we will be interacting with
MsAccessProvider provider = new MsAccessProvider();
 
//Build the connection string
string connnectionString = string.Format(baseConnectionString, Util.GetCurrentDirectory() + "TestDatabases\\DataAccessLayerTests.mdb");
provider.ConnectionString = connnectionString;
 
DataHelper db = new DataHelper(provider);
            
//Specify User Name and License Key from the receipt, leave blank for trial mode
//db.UserName = "John Smith 1234";
//db.LicenseKey = "asdfl219==";
'New up the provider for what database we will be interacting with
Dim provider As New MsAccessProvider()
 
'Build the connection string
Dim connnectionString As String = String.Format(baseConnectionString, Util.GetCurrentDirectory() & "TestDatabases\DataAccessLayerTests.mdb")
provider.ConnectionString = connnectionString
 
Dim db As New DataHelper(provider)
            
'Specify User Name and License Key from the receipt, leave blank for trial mode
'db.UserName = "John Smith 1234"
'db.LicenseKey = "asdfl219=="
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataHelper Class
DataHelper Members
Overload List