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
Why is stored procedure used in ado.net?
What is the difference between Data adaptor and Data set?
What are different layers of ADO.Net?
What is ado.net explain with diagram?
Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.
What is an orm, and why would you use one instead of plain old ado.net?
What is DataReader Object?
How is it possible to get 2 tables of data at a time by using data reader?
What are the data access namespaces in .NET?
What is ado.net components?
Explain executenonquery?
Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.
What are advantages of microsoft-provided data provider classes in ado.net?
What is isolation?
Is ado.net an orm?