473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Visual studio denying access to database in Server Explorer

Visual Studio is giving me errors when trying to connect to a database server on my
LAN. This has been working for years. Then this morning when I opened VS I went to
the server explorer before opening a project and tried to access a database and got
an error: Invalid User Name or Password. Enter a valid user name and password.

I closed VS down and opened it again and opened a solution. Same error. I then
deleted the connection from the list and tried to reestablish it. I got a message
telling me that I was already connected to the database and wanted to know if I
wanted to disconnect and then reconnect. I answered yes. Then I got a message
telling me it could not disconnect from the server that the connection was still
active. When I clicked ok, I got another error message: Could not reconnect to
"{0}". If your machine is already connected to that server, disconnect and then try
again.

I can go to data connections and establish a connection to that server. I can
connect to it from SQL Server Enterprise manager too. I don't know what to do, I
really want access to that server via the Server Explorer as it is easier for me to
edit stored procedures.

Any suggestions as to what I can do to get this back?

Thanks.
Jul 21 '05 #1
7 2815
Hi Mike,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're trying to connect to a
database using Server Explorer, an error which says invalid username and
password was shown. If there is any misunderstanding, please feel free to
let me know.

This is very weird that since you can connect to the database using
Enterprise manager, but cannot using the server explorer. Here is my
suggestion:

1. Restart the machine to make sure that all the connections from this
computer to the database are disconnected.
2. Start VisualStudio .NET, but don't open any solutions.
3. Open Server Explorer and delete the original database connection.
4. Try to recreate the connection to see if it works.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2
Kevin,

You understand the issue correctly as I documented it exactly.

I did what you suggested, and I am getting the same errors.

What next?

Thanks,

Mike

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:C4**************@TK2MSFTNGXA03.phx.gbl...
Hi Mike,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're trying to connect to a
database using Server Explorer, an error which says invalid username and
password was shown. If there is any misunderstanding, please feel free to
let me know.

This is very weird that since you can connect to the database using
Enterprise manager, but cannot using the server explorer. Here is my
suggestion:

1. Restart the machine to make sure that all the connections from this
computer to the database are disconnected.
2. Start VisualStudio .NET, but don't open any solutions.
3. Open Server Explorer and delete the original database connection.
4. Try to recreate the connection to see if it works.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #3
Hi Mike,

Could you let me know if you have installed something new on the machine
before this happens?

Since the Server Explorer is using ADO to connect to the SQL server, I
think re-installing MDAC on the machine will be helpful. You can download
from the following link if you haven't had windows xp sp2 installed:

http://www.microsoft.com/downloads/d...fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #4
Kevin,

I did not install anything new on the machine. I am extremely picky about what I put
on my development machine - I consider it a production machine actually. All that
happened was that one day it was working, and then next day, I experienced the
behavior I documented for you.

Are you really certain that reinstalling ADO is going to do this? I really do not
like uninstalling and reinstalling software. Aren't there any other options other
than reinstalling software?

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:wb****************@TK2MSFTNGXA03.phx.gbl...
Hi Mike,

Could you let me know if you have installed something new on the machine
before this happens?

Since the Server Explorer is using ADO to connect to the SQL server, I
think re-installing MDAC on the machine will be helpful. You can download
from the following link if you haven't had windows xp sp2 installed:

http://www.microsoft.com/downloads/d...fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #5
Hi Mike,

I completely understand your situation. Currently, I could not reproduce
this issue on my machine. So I can only suggestion you to have a try to see
if re-installing MDAC can resolve this issue.

Actually, installing MDAC 2.8 does no harm to your machine. It upgrades the
dlls if you're currently using an earlier version. And it re-registers
components to make sure they work fine if you have already had MDAC 2.8
installed. However, if you have had Windows Xp sp2 installed, please do NOT
install it, since the version of MDAC in sp2 is newer than 2.8. We cannot
down-grade it.

Also, before re-installing, could you let me know, whether you're
connecting to a remote server or a local database server? Could you please
try to reset the password for the certain user on the server, and connect
again?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #6
Kevin,

I am connecting to a local database server.

I am running under service pack 2 so I will not be reinstalling mdac 2.8.

Resetting the password on the server does not make sense, Kevin as I am connecting as
a domain user.

I just tried logging into the server again from the server explorer, and now it is
permitting me to login. Nothing was ever changed previously and now mysteriously,
this started working again.

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:ZQ**************@TK2MSFTNGXA03.phx.gbl...
Hi Mike,

I completely understand your situation. Currently, I could not reproduce
this issue on my machine. So I can only suggestion you to have a try to see
if re-installing MDAC can resolve this issue.

Actually, installing MDAC 2.8 does no harm to your machine. It upgrades the
dlls if you're currently using an earlier version. And it re-registers
components to make sure they work fine if you have already had MDAC 2.8
installed. However, if you have had Windows Xp sp2 installed, please do NOT
install it, since the version of MDAC in sp2 is newer than 2.8. We cannot
down-grade it.

Also, before re-installing, could you let me know, whether you're
connecting to a remote server or a local database server? Could you please
try to reset the password for the certain user on the server, and connect
again?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #7
Hi Mike,

This is really mysterious. Anyway, it is good to know that your Server
Explorer is working again. Thanks for sharing your experience with all the
people here. If you have any questions, please feel free to post them in
the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Belee | last post by:
1. I am using sql server express and visual studio 2003. I have been able to create the connection to the database in server explorer but cannot update table definitions. It gives an error that...
16
by: Nathan Sokalski | last post by:
I have Visual Studio .NET and SQL Server Desktop Engine on my computer. I have created an empty database using Visual Studio .NET's Server Explorer. However, I am having trouble connecting to the...
5
by: Microsoft | last post by:
Hi, I have Visual Basic .net 2003 (Standard Edition) & SQL Server 2000 Developer Edition. When trying to create a connection in the server explorer from the .net IDE I get a number of problems;...
7
by: Mike Malter | last post by:
Visual Studio is giving me errors when trying to connect to a database server on my LAN. This has been working for years. Then this morning when I opened VS I went to the server explorer before...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
1
by: bharathreddy | last post by:
This Article gives an introduction to VSTS Team Foundation & fundamental difference between Visual Source Safe (VSS) and VSTS Team Foundation. Team Foundation is a set of tools and technologies...
0
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
Last week I asked a question about connection to database from client machine (developer machine). There are two types of security setup for SQL Server database: Windows only and "SQL Server and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.