How can I create valid connection string by using shared memory protocol to connect a named instance of sql server?
ado.net, connection-string, sql-server, sql-server-2005, sql-server-2008
Solution
The connect string format that I am using to create a connect string in a C++ application using ADO to access SQL Server through shared memory is as follows.
"Provider=MSDASQL;DRIVER={SQL Server};SERVER=lpc:(local);DATABASE=%s;UID=; Password=;"
The `lpc:` in the `SERVER=` value forces the server connection to use the shared memory protocol. The `%s` is used to put the specific database name into the actual control string generated from this format.
See SQL Connect String
Problem
How can I create a valid connection string by using shared memory protocol to connect a named instance of sql server while the sql server browser is disabled?