469,292 Members | 1,322 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,292 developers. It's quick & easy.

Issue with VS.NET talking to SQL Server

I have a problem establishing a link between Visual
Studio.NET 2003 and SQL Server 2000. Both are installed on
a Windows Server 2003, standard version.

Visual Studio.NET Issues
===================
From Visual Studio.NET 2003 I attempt to ‘Connect to a
database’

The ‘Data Link Properties’ dialog box appears.

I enter the server name: (local)

and then elect to ‘Use a specific user name and password’

No matter what user name and password I enter (including
the Administrator username and password) all I get is the
following message:

Login failed for user ‘Administrator’. Reason: Not
associated with a trusted SQL Server connection.

And then:

Login failed. Catalog information cannot be retreived.

My first VS.NET question is: What username and password is
the dialog box ‘Data Link Properties’ looking for? I want
to use a username and password. I know I could use Windows
authentication, but I cannot use that feature in this
case. I want to use the ‘sa’ username and its associated
password.

My second VS.NET question is: How do I set up a trusted
SQL Server connection? What is it? There appears to be no
documentation that I can find that details what it is and
how it is set up.

SQL Related Issues - which follow on from the issues with
VS.NET
================================================
Opening the SQL Server Enterprise Manager I viewed the
properties of the sa login. I had actually set a password
for the sa when I applied Service Pack 3a. This password
consisted of 11 letters. For some reason it had been
altered to just 10 letters. I then changed the password to
five letters, confirmed it, viewed the sa login properties
and found it had been increased to 10 again.

My first SQL question is: Why are the passwords I am
entering in the Security \Logins part of SQL Server being
altered to a 10 character password, whose content I am not
aware of?

My second SQL question is: How do I stop this happening?

My third SQL question is: Is this a bug and if so where is
it documented?

Jul 21 '05 #1
4 1514
Hi,

Thanks for your post. I'd like to share the following information with you:

1. >> What username and password is the dialog box ‘Data Link
Properties’ looking for?

It requires to enter the username and password for the SQL Server, say,
"sa".

2. >> How do I set up a trusted SQL Server connection? What is it?

Actually, the error message "Reason: Not associated with a trusted SQL
Server connection." just indicates that you input invalid username and
password for SQL Server.

When we write a connection string to connect to SQL Server, there is an
option "Trusted_Connection" indicating that the User ID and Password are
specified in the connection string (it's the same with the "Use a specific
user name and password" in the "Data Link Properties" dialog).

SqlConnection.ConnectionString Property
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemDataSqlClientSqlConnectionClassConnecti onStringTopic.asp

Regarding the SQL Server question:

1. >> Why are the passwords I am entering in the Security \Logins part of
SQL Server being altered
to a 10 character password, whose content I am not aware of?


Based on my experience, the Login part of SQL Server alway display 10
characters of "*" regardless of the actual length of the password. I
believe this was designed to prevent a user from guessing the password when
it's short.

2. >> How do I stop this happening?

I am afraid there is no method to work around this problem.

BTW, in the future, it would be best to post SQL Server questions under the
following newsgroup:
microsoft.public.sqlserver

Please feel free to let me know if you have any problem or concerns. I am
standing by for your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Hi Tian,

Thanks for the reply - but unfortunately it does not solve my problem.

I'll concentrate on the .NET side of the issue.

When attempting to create a database connection, the dialog box "Data Link
Properties" appears and I have been entering userid 'sa' and its associated
password - which I set up when I applied the service pack. However, this
userid and password does not work - neither do any other userid password
combinations that have been set up in the Security \Logins section of SQL
server. I have checked the security settings on the 'sa' user in SQL Server
2000 Enterprize Manager, and reset the password to a new one (less than ten
characters) just in case I was entering an incorrect password, but still no
connection.

The error messages I get are the same ones as I have detailed below.

Note again, that if just Windows authentication is used the connection works
fine.

It would appear to me that this is an undocumented feature - Visual
Studio.NET 2003 cannot communitcate with SQL Server 2000 when a userid and
password are supplied in the "Data Link Properties".

Is there any patch/workaround I can use to solve this problem?

Thanks,

Tom.

"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:nI*************@cpmsftngxa06.phx.gbl...
Hi,

Thanks for your post. I'd like to share the following information with you:
1. >> What username and password is the dialog box ‘Data Link
Properties’ looking for?

It requires to enter the username and password for the SQL Server, say,
"sa".

2. >> How do I set up a trusted SQL Server connection? What is it?

Actually, the error message "Reason: Not associated with a trusted SQL
Server connection." just indicates that you input invalid username and
password for SQL Server.

When we write a connection string to connect to SQL Server, there is an
option "Trusted_Connection" indicating that the User ID and Password are
specified in the connection string (it's the same with the "Use a specific
user name and password" in the "Data Link Properties" dialog).

SqlConnection.ConnectionString Property
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfSystemDataSqlClientSqlConnectionClassConnecti onStringTopic.asp

Regarding the SQL Server question:

1. >> Why are the passwords I am entering in the Security \Logins part of
SQL Server being altered
>> to a 10 character password, whose content I am not aware of?

Based on my experience, the Login part of SQL Server alway display 10
characters of "*" regardless of the actual length of the password. I
believe this was designed to prevent a user from guessing the password

when it's short.

2. >> How do I stop this happening?

I am afraid there is no method to work around this problem.

BTW, in the future, it would be best to post SQL Server questions under the following newsgroup:
microsoft.public.sqlserver

Please feel free to let me know if you have any problem or concerns. I am
standing by for your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
Hi Tom,

Thanks for your feedback. Based on my experience, the problem may be caused
that you configured the SQL Server accepts Windows authentication mode
only. I'd like you perform the following steps and see if the problem still
exists:

1. In SQL Enterprise Manager, right click the server name, click
Properties, and click the Security tab.
2. Change the Authentication mode from Windows only to SQL Server and
Windows.
3. Restart MSSQLServer service.

I look forward to your result.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4
Tian,

This sorted the problem out.

Thanks for your help.

Tom.
"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:eW**************@cpmsftngxa06.phx.gbl...
Hi Tom,

Thanks for your feedback. Based on my experience, the problem may be caused that you configured the SQL Server accepts Windows authentication mode
only. I'd like you perform the following steps and see if the problem still exists:

1. In SQL Enterprise Manager, right click the server name, click
Properties, and click the Security tab.
2. Change the Authentication mode from Windows only to SQL Server and
Windows.
3. Restart MSSQLServer service.

I look forward to your result.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by E Sullivan | last post: by
30 posts views Thread by Kong Bhat | last post: by
3 posts views Thread by Jeffery Franzen | last post: by
13 posts views Thread by mehdi_mousavi | last post: by
2 posts views Thread by Chizl | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.