473,404 Members | 2,178 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,404 software developers and data experts.

Error in connecting to Database.

Hi,
I am developing a small web application which connects to MS SQL Server
2000 (Developer Edition). But there is some problem in connection
string, becaz of which it is giving Error and not getting connection to
the database. Please help me to solve this problem.
Thanks,
Nikki

Nov 17 '05 #1
4 1112
Possible errors in the string can have:
- server name
- database name
- user name
- password

or you're specifying user credentials, where trusted connection ( SSPI ) is
expected....

Also it would greatly help, if you will tell the error, thats being returned
when connection fails....
--
Vadym Stetsyak aka Vadmyst

"Nikki" <ap*********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,
I am developing a small web application which connects to MS SQL Server
2000 (Developer Edition). But there is some problem in connection
string, becaz of which it is giving Error and not getting connection to
the database. Please help me to solve this problem.
Thanks,
Nikki

Nov 17 '05 #2

Connection String which i m using is ->
string conn_str = "server=localhost; database=northwind;
Trusted_Connection=true; Integrated Security=SSPI;"

the Exception raised is:
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlCo
nnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DatabaseAccessWebApp.WebForm1.GetData() in
c:\inetpub\wwwroot\databaseaccesswebapp\webform1.a spx.cs:line 66"

Now can u tell where am i going wrong ?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
are you sure that the server is running? try to connect with Query Analyzer
(QA).
If it will also fail, you can create specific user and then use his
credentials in the connection string.
--
Vadym Stetsyak aka Vadmyst

"Nikki V" <ap*********@gmail.com> wrote in message
news:ec**************@TK2MSFTNGP14.phx.gbl...

Connection String which i m using is ->
string conn_str = "server=localhost; database=northwind;
Trusted_Connection=true; Integrated Security=SSPI;"

the Exception raised is:
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlCo
nnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DatabaseAccessWebApp.WebForm1.GetData() in
c:\inetpub\wwwroot\databaseaccesswebapp\webform1.a spx.cs:line 66"

Now can u tell where am i going wrong ?

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #4
Raj
Connection String which i m using is ->
string conn_str = "server=localhost; database=northwind;
Trusted_Connection=true; UserID=sa;Pwd="

Use the default user id of Sql server sa and password if any thing is set.

Raj

"Nikki V" wrote:

Connection String which i m using is ->
string conn_str = "server=localhost; database=northwind;
Trusted_Connection=true; Integrated Security=SSPI;"

the Exception raised is:
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlCo
nnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DatabaseAccessWebApp.WebForm1.GetData() in
c:\inetpub\wwwroot\databaseaccesswebapp\webform1.a spx.cs:line 66"

Now can u tell where am i going wrong ?

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #5

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

Similar topics

12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
6
by: Chris Love | last post by:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not...
7
by: deltalimagolf | last post by:
I now get the following error message after copying an asp.net application to the deployment web server. I don't have SQLExpress or any version of SQL 2005 installed. I found the "LocalSQLServer"...
5
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting...
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: 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?
0
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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
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...

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.