[VB.NET2005] 3-tier layer application

marco.santilli

New member
Joined
Feb 28, 2008
Messages
1
Programming Experience
5-10
Hi to all.

I would like to create a 3 tier application in vb.net with sqlclient database connection, as follows:



1. One base class "DALBase" where I write all the functions I needed to make the connection, execute command, close connection with SQL server 2005 database;

2. One or more classes (DALObject1,... DALObject(n)) that hinerits DALBase. I want to specialize these classes writing all the functions that get/set dataset and the SQL string;

3. One or more classes (BCLObject1, ... BCLObject(n)) that create an instance of DAL class where I write all the functions visible to the presentation layer.



I found this sample in internet (http://www.santillimarco.it/files/varie/Patient.rar) using OleDB connection.

Can you suggest me some link where I can find a sample with sqlclient db connection???


i read that create a connection, popolate a dataset, close the connection will be better to use OleDB connection instead sqlclient connection.


it's right???



Thanks for your help
 
Hi Marco.

I think the best way to do is to simply convert all those oleDB classes being referenced and declared in the SQL command of that sample application to class declarations supported by SQL.

For example

OleDBDataReader = SQLDataReader
OleDBDataset = SQLDataset

OleDB is commonly used if the application would be accessing OLE compliant databases, while if you are particularly connecting to Microsoft databases, then SQL would be better used.
 
Hi to all.

I would like to create a 3 tier application in vb.net with sqlclient database connection, as follows:

To be blunt: what a waste of time coding all that. It's what the dataset designer does anyway!
Follow the advice in the DW2 link in my signature and you can make a 3 tier app in seconds without all this pointless extra typing!
 
Back
Top