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
Which components of a data provider is used to retrieve, insert, delete, or modify data in a data source?
What providers does Ado.net uses?
What is data view and variable view?
Define Execute Scalar?
What is a serialized object?
Explain how do you connect to sql server database without using sqlclient?
What is data reader in ado.net?
Can we load multiple tables in a dataset?
What is Data view?
What is the provider being used to access oracle database?
What does datareader object do?
How to find the given query is optimised one or not?
Explain advantages of ado.net?
What DataReader class do in ADO.NET ?
What is difference between dataset and datatable?