472,805 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

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 1622
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places....
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
30
by: Kong Bhat | last post by:
With XML becoming the de facto data description standard, I am extremely surprised that there is no movement towards standardizing an xml library API for use with C and C++. Personally I have been...
3
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add...
6
by: Frodo | last post by:
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...
1
by: Pharoh | last post by:
I've inherrited an application that I have to both support and maintain here at work but it comes with one very big headache... The employees who use it are not allowed access to the server it's...
13
by: mehdi_mousavi | last post by:
Hi folks, In an N-tier application, what is the possible values of N??? I'm not kidding, I just interviewed with a programmer today, and he started the "2-tier application" conversation. From then...
2
by: Chizl | last post by:
I have a C# developed web service.. Everyone once in a while I see it not running.. There are no logs saying it was shutting down, no eventlog saying there was an error or it was being shutdown,...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.