Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi guys,

if we want to get the data from multiples dataproviders(ie., from sqlserver,oracle,sybase,msoracle,msaccess and so.......)
then how can i made a connection to the databases using ado.net in asp.net
Posted

You need to read about Data Provider Model


It is based on Provider Design Pattern and can be used for such scenarios. There are lots of material on internet.
For start, read here:The Provider Model[^]
 
Share this answer
 
Its better to make an Interface, which has the declaration of all the basic method that one needs to use in application.Now make a class for evry dataprovider with implementing the interface. Now at runtime you need to decide which class you want to instantiate based on the dataprovider and use it.
You can put all the connection strings in DB.
 
Share this answer
 
 
Share this answer
 
You have a switch/case statement that uses a different connection string for each database type. Use Connection Strings from this website: clickety[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900