Reply to Re: 2005: cannot to connect from .NET

Your name:

Reply:


Posted by Erland Sommarskog on 08/07/06 13:27

RAM (r_ahimsa_m@poczta.onet.pl) writes:
> I have noticed something interesting.
> The problem occurs when I am configuring data source control. The
> connection string is taken from web.config:
><add name="MIMMagazynDemo" connectionString="Data Source=localhost;Initial
> Catalog=MIMMagazynDemo;Integrated Security=True"
> providerName="System.Data.SqlClient" />
>
> I have noticed that the problem do not exist when I change localhost to
> PC\SQLEXPRESS (PC is name of my computer).
>
> Could you explain me why? Thank you!

SQL Server permits you to install several instances on the same machine.
One of these instances can be a default instances, all other instances
must be named.

When you refer to a default instance, you refer only to the machine name,
or, if you are on the machine itself, you can use ".", "localhost" or
"(local)" instead.

When you refer to a named instance, you must also include the instance
name separated from the machine name with a backslash, for instance
MYSERVER\MY2NDINSTANCE.

By default, SQL Server Express is installed as a named instance as
SQLEXPRESS, and thus "localhost" alone will not work on a machine that
only has SQL Express.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация