Issue with VS.NET talking to SQL Server

F

Frodo

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

Tian Min Huang

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/default.asp?url=/library/en-us/cpref/html/
frlrfSystemDataSqlClientSqlConnectionClassConnectionStringTopic.asp

Regarding the SQL Server question:

1. >> Why are the passwords I am entering in the Security \Logins part of
SQL Server being altered
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.
 
F

FrodoBaggins

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

Tian Min Huang

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top