If we want to connect to many databases in dataaccess layer
such as MSAccess,Sql server,oracle means not to a particular
database depends on condition we have to connect to
appropriate database in this scenario if we without changing
code Ho wdo you handle this situation?

Answer Posted / ganesh

Create appropriate provider at run time(use factory
patterns) based on some configurations setting (probably a
XML file).This will allow user to decide providers
dynamicallly and enable connecting to whatever database he
wants

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain ado.net features?

775


What is different between sqlcommand object and command behavior object?

735


Why ca not we use multiple inheritance and garbage collector paralelly in .net?

764


can we create synonymn in ms access,sql server,my sql if so explain me with example

1814


Explain the advantages and disadvantages of using datalist?

795


Some important instruction regarding ADO.NET connection string ?

740


What is ole db query?

741


Explain the two fundamental objects in ado.net?

674


Explain ODP.net

758


What is the difference between Dataset. clone and Dataset.copy?

768


How can we check that some changes have been made to dataset since it was loaded?

733


What is the difference between data reader and data adapter?

765


Explain what are the steps to connect to a database?

717


What is ado.net components?

681


What are the important features of ado.net 2.0?

816