473,503 Members | 12,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Server does not exist or access denied.

I'm new to Visual Studio.NET and Visual Basic.NET. While trying to run the
sample application, it shows an error message as shown below. I have an SQL
Server containing the sample database Northwind used in this application.
Authentication mode set in Web.config is Windows; Mixed mode in the SQL
Server. Any idea how I can resolve this problem? Thanks...

Server Error in '/HowToBuildAWebDataEntryApp' Application.
----------------------------------------------------------------------------

SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not
exist or access denied.

Source Error: (Note: highlighted on line 201)

Line 199: Dim scnnNW As New SqlConnection(SQL_CONNECTION_STRING)
Line 200: Dim scmd As New SqlCommand(strSQL, scnnNW)
Line 201: scnnNW.Open()
Line 202: scmd.ExecuteNonQuery()
Line 203: scnnNW.Close()

Source File: C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb
Line: 201

Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +472

System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
HowToBuildAWebDataEntryApp.Main.SetupDemo() in
C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb:201
HowToBuildAWebDataEntryApp.Main.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb:163
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

----------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573

Jul 21 '05 #1
4 5593
Check the user name and password. Make sure SQL Server is running in mixed
mode. Also, make sure you have the right server name.

What version of SQL Server? With 6.5, you will want to look at this:
http://support.microsoft.com/default...;EN-US;q315159

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"hooi" <se******@hotpop.com> wrote in message
news:eC****************@TK2MSFTNGP12.phx.gbl...
I'm new to Visual Studio.NET and Visual Basic.NET. While trying to run the sample application, it shows an error message as shown below. I have an SQL Server containing the sample database Northwind used in this application.
Authentication mode set in Web.config is Windows; Mixed mode in the SQL
Server. Any idea how I can resolve this problem? Thanks...

Server Error in '/HowToBuildAWebDataEntryApp' Application.
-------------------------------------------------------------------------- --
SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not
exist or access denied.

Source Error: (Note: highlighted on line 201)

Line 199: Dim scnnNW As New SqlConnection(SQL_CONNECTION_STRING)
Line 200: Dim scmd As New SqlCommand(strSQL, scnnNW)
Line 201: scnnNW.Open()
Line 202: scmd.ExecuteNonQuery()
Line 203: scnnNW.Close()

Source File: C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb
Line: 201

Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +472

System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
HowToBuildAWebDataEntryApp.Main.SetupDemo() in
C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb:201
HowToBuildAWebDataEntryApp.Main.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb:163
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

-------------------------------------------------------------------------- -- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Jul 21 '05 #2
Check the user name and password. Make sure SQL Server is running in mixed
mode. Also, make sure you have the right server name.

What version of SQL Server? With 6.5, you will want to look at this:
http://support.microsoft.com/default...;EN-US;q315159

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"hooi" <se******@hotpop.com> wrote in message
news:eC****************@TK2MSFTNGP12.phx.gbl...
I'm new to Visual Studio.NET and Visual Basic.NET. While trying to run the sample application, it shows an error message as shown below. I have an SQL Server containing the sample database Northwind used in this application.
Authentication mode set in Web.config is Windows; Mixed mode in the SQL
Server. Any idea how I can resolve this problem? Thanks...

Server Error in '/HowToBuildAWebDataEntryApp' Application.
-------------------------------------------------------------------------- --
SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not
exist or access denied.

Source Error: (Note: highlighted on line 201)

Line 199: Dim scnnNW As New SqlConnection(SQL_CONNECTION_STRING)
Line 200: Dim scmd As New SqlCommand(strSQL, scnnNW)
Line 201: scnnNW.Open()
Line 202: scmd.ExecuteNonQuery()
Line 203: scnnNW.Close()

Source File: C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb
Line: 201

Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +472

System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
HowToBuildAWebDataEntryApp.Main.SetupDemo() in
C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb:201
HowToBuildAWebDataEntryApp.Main.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\HowToBuildAWebDataEntryApp\main .aspx.vb:163
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

-------------------------------------------------------------------------- -- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Jul 21 '05 #3
Thank you Cowboy for your reply

I'm using SQL Server 2000, Visual Studio.NET 2003. The SQL Server is set to mixed mode

When you say 'must have the right Server name', my SQL server name is "NB", do I have to reference it in my main.aspx? My sqlconnection string in the main.aspx is as follows

protected const string SQL_CONNECTION_STRING =
"Server=localhost;" +
"DataBase=northwind;" +
"Integrated Security=SSPI"
---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Jul 21 '05 #4
Thank you Cowboy for your reply

I'm using SQL Server 2000, Visual Studio.NET 2003. The SQL Server is set to mixed mode

When you say 'must have the right Server name', my SQL server name is "NB", do I have to reference it in my main.aspx? My sqlconnection string in the main.aspx is as follows

protected const string SQL_CONNECTION_STRING =
"Server=localhost;" +
"DataBase=northwind;" +
"Integrated Security=SSPI"
---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Jul 21 '05 #5

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

Similar topics

2
2133
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
2
3270
by: george r smith | last post by:
Gentlemen, I know that this problem has happened before and I searched and tried all solutions but problem is not solved. I install asp.net community starter kit with some help from this...
6
467
by: Bob | last post by:
Having trouble getting started. I created an instance of MSDE called VSDOTNET on a computer with the name of sysdev. Using MS SQL Web Adminstrator I created a database called temp with a...
3
2505
by: Matthew Louden | last post by:
I attempt to connect ASP.NET application with SQL Server using ADO.NET. I just open a connection, and it had run-time error in line 34: cn.open(): SQL Server does not exist or access denied....
3
567
by: Olivogt | last post by:
Hello, I was just puting an application on the web server but it did not work as usual... - I do develop on my notebook and move released applications to the Web server - both have Sql Server...
9
2119
by: Steven Ung | last post by:
Hello all, I'm having the following error dump from an ASP.net application. The program is to calculate MRP and it involves complex queries looping thru hundreds of records in an few SQL 2000...
1
2055
by: ssp | last post by:
G'Day All, I have a web application sitting on my laptop and a Sql Server 2000 database on our INTRANET server running Windows 2003. Up until recently I was able to access the database using my...
2
3129
by: Johan Johansson (Sweden) | last post by:
I can't connect to our database (seperate database server) from within my webservice. I cannot understand why.!!! * I have configured IIS not to allow anonymous access and to use "windows...
1
4177
by: Atia Amin | last post by:
Hi, I am a new member. Hello to every one. I am new in ASP.NET area. I wrote an ASP.NET web application which was running ok with my old laptop. Currently I have given a new laptop. Now I copied...
1
4614
by: vamshika | last post by:
hi, I got a serious Problem. I get "Server does not exist or access denied" with 80004005 as the error code. the win2003 server uses all the latest components(like iis6,jet..etc) and is upto date....
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.