You are here: Re: Can't Connect to SQL db « MsSQL Server « IT news, forums, messages
Re: Can't Connect to SQL db

Posted by Erland Sommarskog on 02/14/07 22:24

DanWeaver (danofweaver@googlemail.com) writes:
>> Do you have any particular reason you want to use SQL authentication?
>> Else, change "uid=sa;pwd=" to "Integrated Security=SSPI".
>
> Thanks, Erland. That helped move me on- in fact the first time I tried
> it it seemed to work (though my record was not added- posibly as there
> already existed a record with same id) Anyway- I cant experiment with
> that cos shorlty after I could no longer connect- seems strange- I
> checked the table after first successful run to see if it had updated
> and ran the code again- got a message "another process is locking the
> db"- great I thought- all is working- and closed the connection in
> VS-
> now though the connection gets stuck at login and says:
>
> Cannot open database "pubs" requested by the login. The login failed.
> Login failed for user 'KRISLAPTOP\Kris'.

Seems like that either your user is not present in the pubs database,
or the database has somehow gone away.


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

 

Navigation:

[Reply to this 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

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