Link to home
Start Free TrialLog in
Avatar of vj_mi
vj_mi

asked on

Connection and other objects to work on SQL, Oracle and Access

Hi,

I have a data access layer code that is written to work on SQL Server. So I have sqlConnection, sqlCommand objetcs and so on. But now my client want it to work on SQL, Oracle and Access. So which objects should I use? I want it to be generic.

Regards,
MI
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

I don't know any adapter that work with multiple databases but you can give the option to choose the connection that the user wants and according to that use different connection (oldbconnectiom, sqlconnection and oracleconnection)

jpaulino
If you don't know how to connect you can look on http://www.connectionstrings.com/

jpaulino
Avatar of vj_mi
vj_mi

ASKER

Hi,

The database will depend on my client. Some client s will have SQL Server whereas some amy have Oracle or simply Ms-Access. My app is supposed to work on all these type of databases.

Regards,
MI
But that is no problem. What you have to do is to make an initial configuration selection the database type. Of course that you have to build diferent connection for different databases and alse different manage instruction(SELECT, UPDATE, DELETE, etc).

It's hard work but not to difficult.

jpaulino
Avatar of vj_mi

ASKER

Does this mean, if I have a method called GetEmployeeDetails(), I will have to write 3 functions - one for SQL, one for Oracle and for MS-Access since I will have to write 3 different declarations like:
Dim x as sqlConnection or Dim x as oleDBConnection and so on? In that case, my app will blow up in size since for every one function, I will have to write 3 functions and that would increase the maintenance cost of the app.

Regards,
MI
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial