Non SQL Server DataSources

The business object in its current state is designed primarily for operation with SQL Server. However, there is intrinsic support for several other providers:

The currently supported backends are:

Each of these providers is implemented through wwData provider class which can be dynamically loaded by the wwBusiness class. The concept works like this:

Typically the connection string and backend type is provided in the constructor of the object and this is a one tim implementation step. For example:

public busCustomer() { this.Tablename = "wws_customers"; this.ConnectType = ServerTypes.MySql; this.ConnectionString = "Server=RASNOTEBOOK;DATABASE=WebStore;User ID=WebStore;PASSWORD=wwind;"; }

Typically you will not hard code connection strings but instead create a constructor just like this retrieving the backend type and connection information from the App.Configuration object:

public busCustomer() { this.Tablename = "wws_customers"; this.ConnectType = App.Configuration.ConnectType; this.ConnectionString = App.Configuration.ConnectionString; ID=WebStore;PASSWORD=wwind;"; }

The result of this is that in ASP.Net applications at least you can switch providers on the fly. Change the App.Configuration setting and the business object will automatically pick up a new provider on the next instantiation. This approach is very flexible as it completely decouples your business logic from the data backend.


 Last Updated: 1/18/2004 | Send topic feedback