potential for Multiple databases

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Hi All.

I am writing an application, that could potentially use 1
of a number of databases, ie the client I sell the
application to might want his database to be Access, or
mySQL, or SQL Server etc. What do I need to do in order
for my application to cater for these potential different
databases, because now in my code I have oleDBAdapter etc,
now what if the client wants SQL Server? Isn't the SQL
syntax slightly different when it comes to updates inserts
etc for example between mySQL and SQL Server? All I want
is to tell my App that I'm going to use an SQL database,
and it must know how to handle the data - how do I do
this? Can someone point me in the right direction?

Thanks alot for any help.

Kevin
 
Write a middle layer that has a lot of "if (db == SQLServer) then .... else
if (db == MySQL) then ... else ..." statements. The rest of your app calls
this middle layer.
 
Back
Top