Visual Studio
MS SQL Server
i have this connection string...
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated Security=SSPI;
but an error appears on my conn.Open();
Cannot open database "dbName" requested by the login. The login failed.
Login failed for user 'SERVER\yshie'.
yshie is my username in the computer i use. just to clarify, there are two
user accounts in my pc but both of them are administrators.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-connectivity/200703/1
ok.. i'll start from a scratch! kindly help me build my connection string!
pls don't refer me to different websites because i can't understand those
terms(user instance... etc) so its useless for me. all i know is that i have
this visual studio 2005 and isn't it that inside there is ms sql server where
i created my database. what connection string will i use?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-connectivity/200703/1
|||One of the problems with the approach of "just tell me what
string to use and I don't understand the terms so don't go
into that" is that the problems you are having with the
connection string is from not understanding what those parts
of the string mean. It's like creating classes without
wanting to know what properties or methods are.
You said you are using this string:
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated
Security=SSPI;
And that you get the error:
Cannot open database "dbName" requested by the login. The
login failed.
Login failed for user 'SERVER\yshie'.
The problem is that the login user (you) do not have access
to the database dbName or the database dbName does not exist
on the server. If the database you are using in your string
really is dbName then that database must exist on the server
and you must have access to it.
Just as a connection test, trying changing your Initial
Catalog to master. Keep the data source as: .\SQLEXPRESS
And keep the Integrated Security set to SSPI
-Sue
On Fri, 30 Mar 2007 04:25:14 GMT, "yshie via droptable.com"
<u32884@.uwe> wrote:
>ok.. i'll start from a scratch! kindly help me build my connection string!
>pls don't refer me to different websites because i can't understand those
>terms(user instance... etc) so its useless for me. all i know is that i have
>this visual studio 2005 and isn't it that inside there is ms sql server where
>i created my database. what connection string will i use?
Tuesday, March 20, 2012
Cannot open database requested by the login.
Labels:
catalogdbnameintegrated,
connection,
database,
error,
login,
microsoft,
mysql,
oracle,
requested,
securitysspibut,
server,
serveri,
source,
sql,
sqlexpressinitial,
string,
studioms,
visual
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment