Hi,
Is it possible to build generic application for more than one DataBase.
I want to use MySQL5.x and MS SQL Server with application.
One DataBase at one time.
Hi,
Is it possible to build generic application for more than one DataBase.
I want to use MySQL5.x and MS SQL Server with application.
One DataBase at one time.
Generic Application
Kannan Online
Yes Jafar it is possible to write data access code which is totally provider independent. All this can be achieved by using DbProviderFactory calss.
For more help check the following links
Also you can fire a search in some search engine to find the "DbProviderFactory samples".
Duane Douglas
If MySQL has an oledb driver you can use the OleDBxxx classes and use appropriate connection strings to talk to the correct server.
--
SvenC
VSFW3
Mardo
Have a look here: http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/adodtreader.aspx
To create a correct ConnectionString for your Database provider there is a neat little trick: create an empty file with the extension udl, e.g. myDB.udl
Double click that file and you get a ConnectionString builder. From the first tab page select your provider and then move on to the next pages to set its parameters and make a test connection. After you closed the dialog, open the udl file in a text editor, e.g. NotePad. You will find the ConnectionString as content of the udl file.
--
SvenC