473,382 Members | 1,345 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,382 software developers and data experts.

Age-old "SQL Server does not exist" error

Roy
Judging from the sheer number of posts on this topic, I'm sensing this
is a fairly common problem. Only problem is, I've tried just about
every recommendation in all the posts I've found thus far and none have
worked.

I have XP on my workstation and two servers that run server 2003.
I have sql server dev edition on all 3, but only VS.NET on my
workstation.
I have .NET framework 1.1 on all 3 machines.

I can connect/interact just fine with the SQL Server instances on both
servers using EM, Query Analyzer, and VS.NET "server explorer."
However, pages I make on my workstation that connect to SQL Server on
either of the two servers fail to work. If I take the EXACT same pages
and run them on either server, they work fine.

The error I get is "Exception Details:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied." I strongly suspect that this is a security issue, but I don't
know how to resolve it. I've given (as per other posts) the usernames
ASPNET and NETWORK SECURITY broad rights on all sql server instances,
yet still I can't run a webpage on my workstation that connects. It's
infuriating. Help!
Behold my latest connection string (since I know some of you will want
to see it anyways... ;-)
Dim MyConnection As New
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...

Nov 19 '05 #1
10 1436
"Roy" <ro**********@gmail.com> wrote in news:1114442786.921549.57350
@f14g2000cwb.googlegroups.com:
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


Try appending the SQL server port number to the address (1433)

so:

SqlConnection("server=testserver,1433;uid=test;pwd =pass;database=adp")

For some reason I had to do that at work... or else I couldn't connect...
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Try connecting via Hostname or IP address.

--
TDAVISJR
aka - Tampa.NET Koder
"Roy" <ro**********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Judging from the sheer number of posts on this topic, I'm sensing this
is a fairly common problem. Only problem is, I've tried just about
every recommendation in all the posts I've found thus far and none have
worked.

I have XP on my workstation and two servers that run server 2003.
I have sql server dev edition on all 3, but only VS.NET on my
workstation.
I have .NET framework 1.1 on all 3 machines.

I can connect/interact just fine with the SQL Server instances on both
servers using EM, Query Analyzer, and VS.NET "server explorer."
However, pages I make on my workstation that connect to SQL Server on
either of the two servers fail to work. If I take the EXACT same pages
and run them on either server, they work fine.

The error I get is "Exception Details:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied." I strongly suspect that this is a security issue, but I don't
know how to resolve it. I've given (as per other posts) the usernames
ASPNET and NETWORK SECURITY broad rights on all sql server instances,
yet still I can't run a webpage on my workstation that connects. It's
infuriating. Help!
Behold my latest connection string (since I know some of you will want
to see it anyways... ;-)
Dim MyConnection As New
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...

Nov 19 '05 #3
"TDAVISJR" <an*******@microsoft.com> wrote in news:OzCzeRbSFHA.996
@TK2MSFTNGP09.phx.gbl:

Try connecting via Hostname or IP address.
Did you even read his post?
I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #4
Roy
heh
Took the words outta my mouth Lucas...

I tried hardcoding the port as you suggested. Still no go. :-/

Nov 19 '05 #5

"Roy" <ro**********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Judging from the sheer number of posts on this topic, I'm sensing this
is a fairly common problem. Only problem is, I've tried just about
every recommendation in all the posts I've found thus far and none have
worked.

I have XP on my workstation and two servers that run server 2003.
I have sql server dev edition on all 3, but only VS.NET on my
workstation.
I have .NET framework 1.1 on all 3 machines.

I can connect/interact just fine with the SQL Server instances on both
servers using EM, Query Analyzer, and VS.NET "server explorer."
However, pages I make on my workstation that connect to SQL Server on
either of the two servers fail to work. If I take the EXACT same pages
and run them on either server, they work fine.

The error I get is "Exception Details:
System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied." I strongly suspect that this is a security issue, but I don't
know how to resolve it. I've given (as per other posts) the usernames
ASPNET and NETWORK SECURITY broad rights on all sql server instances,
yet still I can't run a webpage on my workstation that connects. It's
infuriating. Help!
Behold my latest connection string (since I know some of you will want
to see it anyways... ;-)
Dim MyConnection As New
SqlConnection("server=testserver;uid=test;pwd=pass ;database=adp")

I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


I had a similar problem. I know very little about sql but this sequence of
steps helped me get my connection working maybe it will give you some ideas.
You problably don't need to to this at dos. You probably can do it within
sql server.

#at dos prompt osql -E -S COMPUTERNAME
exec sp_grantlogin 'COMPUTER_NAME\ASPNET'
go
#Database_Name is name of sql database without file extension
use Database_Name
exec sp_grantdbaccess COMPUTER_NAME\ASPNET
go
use Database_Name
exec sp_addrolemember 'db_owner', COMPUTER_NAME\ASPNET
go
exec sp_addrolemember 'db_datareader', COMPUTER_NAME\ASPNET
exec sp_addrolemember 'db_datawriter', COMPUTER_NAME\ASPNET
go
#Also you may need to give broader rights to some store procedures
grant execute on 'STORED_PROCEDURE_NAME' to public
Mike
Nov 19 '05 #6
Roy
Thanks for the response Mike.
I just tried your series of things and still nothing.
:(

Nov 19 '05 #7
Sorry guys, somehow I didn't get that

--
TDAVISJR
aka - Tampa.NET Koder
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"TDAVISJR" <an*******@microsoft.com> wrote in news:OzCzeRbSFHA.996
@TK2MSFTNGP09.phx.gbl:

Try connecting via Hostname or IP address.


Did you even read his post?
I've tried using IP's in place of the server name and all. I truly
think this is some obscure security issue...


--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #8
>I can connect/interact just fine with the SQL Server instances on both
servers >using EM, Query Analyzer, and VS.NET "server explorer."

If “Server explorer” works, why don’t you connect to your SQL server at 2003
and drag the db table in server explorer into your page. The VS.NET will
generate connection class automatically. Try to use this class to connect db
in code, and to see if it really works.

Shaw

Nov 19 '05 #9
"Roy" <ro**********@gmail.com> wrote in news:1114450422.152727.132890
@l41g2000cwc.googlegroups.com:
Thanks for the response Mike.
I just tried your series of things and still nothing.
:(


How about try connecting via a System DSN as a test?

Create a DSN for SQL server on the system... then use the System DSN in
your connection string.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #10
Roy
I don't think I can use a system DSN in my connection string... I
looked it up in the documentation and got this:

Note The .NET Framework Data Provider for SQL Server uses its own
protocol to communicate with SQL Server. Therefore, it does not support
the use of an ODBC data source name (DSN) when connecting to SQL Server
because it does not add an ODBC layer.

Nov 19 '05 #11

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

Similar topics

2
by: Mike Obiku | last post by:
First of all, I'm new to PHP. For my website I have some PHP scripts to run a photo database. New users have to register them selfs. After registring the new user is getting an e-mail maid by an...
1
by: Sean Abrahams | last post by:
The following is a reprint of a message I sent to the tutor list a long time ago, that I haven't gotten around to discussing with anyone else and failed to hear a reply on the tutor list. Hoping...
1
by: Andrew V. Romero | last post by:
I have a script that I am working on for an intranet tool and in this script I have a form, which when submitted the onSubmit command calls calculate(). In this calculate function, I have it do...
0
by: vicky | last post by:
Hello Experts, Trying to run sample Postgrel's ECPG(Embedded SQL)programs on RHL 9.0. Im unable to connect to PostgreSQL database (sirishadb) when I run the program .... # su postgres...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
1
by: solomon_13000 | last post by:
connection.asp: <% Sub RunQueryString (pSQL,parms) on error resume next Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &...
4
by: jonniethecodeprince | last post by:
Greetings all. I have a problem with PERL and SQL Server. I need to upload a database query to a web page using PERL and SQL Server. I have tried to do this myself but nothing displays on the...
2
by: Mick Walker | last post by:
I have the following simple class: using System; public class Person { public Person() {
7
by: mac | last post by:
hi, im new to php.can anybody please tell waht tis error is.... Notice: Undefined index: empname in d:\instantrails\www\test\new \formsubmit.php on line 14 thanx mac
5
by: geraldjr30 | last post by:
hi, i have the following: <form method="post" action="<?php echo $PHP_SELF;?>"> <span style='color: #008b8b; font-size: 10pt; font-family: arial'> &nbsp &nbsp <b>search </b><input...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.