Problem when connect to SQL Server 2005 (SQL Native Client + Named instance)



Hi,

I have an application which previous connect to SQL Server 2000.

Now, I installed SQL Server 2005, and try to conncet to it.

The previous connection string is:
sString.Format("DSN=%s;uid=%s;pwd=%s", sDb, sUser, sPassword);

In order to support SQL Native Client driver in SQL Server 2005, I
changed the connection string to:
sString.Format("Provider=SQLNCLI;
DataTypeCompatibility=80;DSN=%s;uid=%s;pwd=%s", sDb, sUser,
sPassword);

I have a default instance and a named instance in my database. So i
created two DSN:
(1) Use SQL Native Client as the driver and connect to the default
instance.
The application could work well under this configuration.

(2) Use SQL Native Client as the driver and connect to the named
instance.
The application could not work successfully under this
configuration.
It could not connect to the database.

I have started the SQL Server Browser service.

Why I could not connect to the database when i use SQL Native Client +
Named instance

Who can help me?

Thanks in advance.

.



Relevant Pages

  • asp.net 2.0 login control
    ... A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] ... These problems left me stranded for days, then today, on another machine, I hit a different set of problems I kept getting the following "Failed to generate user instance of SQL Server due to a failure in starting the process for the user instance. ... (Basically this is a new option in the connection string that allows you to point out where the ..mdf file resides eliminating the need to create database in some SQL instance.) ... Beware that the windows account of the user that first creates the connection in this databaseless manner, becomes exclusive user for this file and no other windows account will be able to create a connection to this file. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Newbie question on SQL connection
    ... database on my developer machine. ... > to develop databases away from the live SQL server - that way in the ... > domain SQL Server. ... Does your connection string contain a typo? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: .NET and SQL Server on Separate Machines
    ... add this domain account as a valid login to your sql server. ... Everything was running correctly when the database ... > The connection string in our web.config file originally looked like this: ...
    (microsoft.public.sqlserver.connect)
  • Re: .NET and SQL Server on Separate Machines
    ... add this domain account as a valid login to your sql server. ... Everything was running correctly when the database ... > The connection string in our web.config file originally looked like this: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: FP2003 fails to validate data connection
    ... The connection string is not correct or DSN are not correct. ... The machine is running XP Pro with IIS 5.1 and SQL Server 2000 both running. ... > The FP2003 Database Results Wizard and Database Interface Wizard have no problem locating the active DSNs on the machine, ... Other apps I have written have no problem using these DSNs. ...
    (microsoft.public.frontpage.programming)