473,327 Members | 1,967 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,327 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 1435
"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:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.