Create OdbcConnection with a DSN onlt?

  • Thread starter Thread starter David Thielen
  • Start date Start date
Hi Dave,

As for ODBC datasource, if datasource is already configured on the system,
you can use DSN to connect it in connectionstring. e.g.

OdbcConnection conn= new OdbcConnection("dsn=myDSN;UID=myUid;PWD=myPwd;");

Here is the knowledge base article introduce how to use .NET managed ODBC
provider to connect ODBC DNS:

#How To Use the ODBC .NET Managed Provider in Visual C# .NET and Connection
Strings
http://support.microsoft.com/kb/310988

and you can always get connectionstring info from the following site:

http://www.connectionstrings.com/


And all the system and user ODBC DSNs are stored in registry, so you can
enumerate all the DSN via looking up registry. Here is a good article
provide an example:

#An ODBC (DSN/Driver) Manager DLL written in C# (Version - I)
http://www.codeproject.com/KB/database/sdbODBCMngr.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
fantastic - thanks - dave


Hi Dave,

As for ODBC datasource, if datasource is already configured on the system,
you can use DSN to connect it in connectionstring. e.g.

OdbcConnection conn= new OdbcConnection("dsn=myDSN;UID=myUid;PWD=myPwd;");

Here is the knowledge base article introduce how to use .NET managed ODBC
provider to connect ODBC DNS:

#How To Use the ODBC .NET Managed Provider in Visual C# .NET and Connection
Strings
http://support.microsoft.com/kb/310988

and you can always get connectionstring info from the following site:

http://www.connectionstrings.com/


And all the system and user ODBC DSNs are stored in registry, so you can
enumerate all the DSN via looking up registry. Here is a good article
provide an example:

#An ODBC (DSN/Driver) Manager DLL written in C# (Version - I)
http://www.codeproject.com/KB/database/sdbODBCMngr.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
You're welcome :)

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

--------------------
 
Back
Top