Article ID: 313295 - Last Review: November 30, 2005 - Revision: 6.5 How to use the server name parameter in a connection string to specify the client network libraryThis article was previously published under Q313295 On This PageSUMMARY This article describes how to programmatically specify the
client network library in the connection string when you connect to a SQL
Server database. In Microsoft Data Access Components (MDAC) 2.6 and later, you can specify the client access library by using the server name parameter in connection string. Therefore, you can specify a specific client access library when you are prompted by an application for a server name to which to connect. This behavior can be very useful when you are testing and troubleshooting connectivity issues for SQL Server. For example, you can use the Osql command-line utility to connect to SQL Server and to force it to use the TCP/IP network library: Code SampleThe following Microsoft Visual C# .NET code sample demonstrates how to set the connection string. The connection string has the same format irrespective of the language that you use:Use the Code Sample with Various Network LibrariesThe following code samples demonstrate how to use the value of the server parameter to specify various network libraries:
REFERENCESFor more
information, visit the following Microsoft Web site: http://msdn.microsoft.com/en-us/library/aa470051.aspx (http://msdn.microsoft.com/en-us/library/aa470051.aspx) APPLIES TO
| Article Translations
|
Back to the top
