If this person is using a DSN, then there is likely no provider(actually 
driver) information.  If that is true,
then you may need to iterate data sources and deterimine what you are using 
(checking the driver used).

If you need code for this, there is code on the net [to iterate ODBC data 
sources].  I also have some classes to
do it as well if you are interested.  I never had much luck with the ODBC code 
on the net as a
cut-and-paste-and-run-with-it.  If you want my code for list let me know.

 - dave

Frans Bouma wrote:
I am using ADO.NET to connect to a database using a DSN
(through the ODBC) in my application. I need to find whether
the database I am connected to is either SQL or Oracle. Is
there anyway we can do this?

        check the connection string: PROVIDER=..... should give you the 
provider used and thus the db used.

                FB

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to