473,508 Members | 2,425 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 5595
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
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
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
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
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
3192
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
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
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
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.