Reply to Re: Can't Connect to SQL db

Your name:

Reply:


Posted by Erland Sommarskog on 02/13/07 22:30

DanWeaver (danofweaver@googlemail.com) writes:
> This is myconnection string: kris\ is this local machine
>
> myConnection = New SqlConnection("server=kris
> \SQLEXPRESS;uid=sa;pwd=;database=pubs")
>
> This is the error I get
> System.Data.SqlClient.SqlException was unhandled
> Class=14
> ErrorCode=-2146232060
> LineNumber=65536
> Message="Login failed for user 'sa'. The user is not associated with
> a trusted SQL Server connection."
> Number=18452
> Procedure=""
> Server="kris\SQLEXPRESS"

Have you enabled you server for SQL authetnication? By default,
SQL Server permits only Window authentication.

Do you have any particular reason you want to use SQL authentication?
Else, change "uid=sa;pwd=" to "Integrated Security=SSPI".

> For logon in SQL Server configuration manager 'built- in account'
> local system is selected rather than the 'this account' option which
> has stars in the password field and no username options.

Note that his is about how SQL Server logs into Windows. That's a
different thing.


--
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

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