Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About SQL server does not exist or access denied!

Status
Not open for further replies.

lehuong

Programmer
Joined
Sep 2, 2003
Messages
98
Location
US
Hi all,
I did my asp .net (vb.net) program in my local machine and it works fine. Then I remote logined (use "Terminal Client Services") to a pc which the provided by the person who have the internet server, put the files into created virtual directory in iis and query the SQL server 2000 to create databse and tables like I did in my machine. when I link to it is ok until I try to retrieve data from the databse then the error "SQL server does not exist or access denied". Is this error cause by the permission? Do I have to be the administrator to do setup this program?
Thanks
howard
 
le: what does your connection string look like? (no passwords, just the code) - compare with the following, which is a valid SQL database connection (variations exists of course - for comparative purposes only) showing the Page Load even:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim sqlconn As SqlClient.SqlConnection
Dim cmdParr As SqlClient.SqlCommand
sqlconn = New SqlClient.SqlConnection("Server=appdata.auburn.edu;uid=water***;pwd=c*****;database=ica****")
Try
sqlconn.Open()
cmdParr = New SqlClient.SqlCommand("SELECT DISTINCT tblParroquias.PB2Name, ..., sqlconn)
ddParr.DataSource = cmdParr.ExecuteReader()
ddParr.DataTextField = "PB2Name"
ddParr.DataValueField = "PB2ID"
ddParr.DataBind()
sqlconn.Close()
Catch objException As SqlClient.SqlException
Dim objError As SqlClient.SqlError
For Each objError In objException.Errors
Response.Write(&quot;<li>&quot; & objError.Message)
Next
Finally
sqlconn.Close()
End Try
End If
End Sub

le: may be unrelated to your problem; but sometimes the connection string turns out to be the issue at hand.
 
Hi Isadore,
My connection string is:

&quot;Server=localhost;UID=PLUSUser;PWD=secret;Database=PLUS&quot;

I don't understand this &quot;Server=appdata.auburn.edu;&quot; can you explain detail how it works? I know that localhost is mean that it is a local machine, so you mean that if I have the URL: the my server must be mysite.com?
Thanks
 
le: I'm at Auburn university, and that is the &quot;name&quot; of the server, so that is what goes there.
 
Auburn is name of what server? Internet server or sql server?
Thanks
 
le: check the name of your server, that should do it; you should have your server's name there (Auburn is the name of my server here at Auburn University).
 
When I changed to my sql server name I got this error:

Login failed for user 'xxx'. Reason: Not associated with a trusted SQL Server connection.

something wrong with it. May be I am not an administrator?
Thanks
 
le: you might be right; I am not a &quot;server&quot; expert; all I do is obtain the necessary password, etc... and the above code worked for me. Perhaps someone will come along and provide some additional insight.
 
appdata.auburn.edu is the name of Isadore's SQL Server. What you need to do is check what the name of the SQL Server YOU are connecting to (check in the Enterprise Manager to see a list of the server names in your server group(s)).

You then have to make sure you have a valid user id, password, database name, and credentials to do what you want to do in the database, but I don't think you're quite to that point yet.
 
Boulder --

Quick question. We have access to an SQL 2000 server here at Auburn Univ (by the way, are you from CO?) -- my question is, they tell us they do not have a copy of Enterprise Manager for distribuiton. Where'd be the best place to get my hands on one that is compatible with SQL Server 2000? As soon as I get this I am going to transfer my tables there (using OLEDB Access right now).
 
Hi Boulder,
How about the valid user id, password, database name where should I check them to make sure they are valid? I know that I can check the database under the server but how about the user id and password?
Thanks
 
&quot;by the way, are you from CO?&quot;

Yup. I'm from Denver, but I go &quot;bouldering&quot;, hense the name.

Enterprise manager actually comes with SQL Server (I have a copy installed locally for testing). The Microsoft Data Engine may have the snap-in, but I don't know. Regardless, you'll need proper access rights to do much of anything with the tool.

If you have the Enterprise Manager running, you can see if the database exist in the list of databases on the server, you can see if the user exists by checking the list of users, you can see if a user has certain permissions by viewing the user's properties, the password... I don't really know.

It sounds like you're having trouble connecting to the server rather than being authenticated on it, however.
 
No, I'm not from CO but I'm from southern CA. I'm creating a website for our company. I'm a new asp .net user. So there are still a few problems I have to face. It is nice to know both of you, Isadore. Anyway, I am working on something else right now. And I will work on the asp .net program tommorrow. Things not always go smooth but I'll try it hard and do the best.
See you,
 
One other thing: you can also view database info through the server explorer (on the upper left part of the IDE normally, you may have to go to View->Server Explorer).
 
Boulder --

Use to work at Rocky Flats as a RCRA Chemist - lived in Idaho Springs - nice area - miss those flat irons though. Beautiful country.

I have all the access rights, even have SQL Databases set up on the SQL server, but no Enterprise Manager yet from Auburn (won't proceed without it). Hasn't been a pressing issue, was just curious.

Thanks for the help Boulder, see ya around.
 
They're cleaning Rocky Flats up as we speak. It's more or less a wind farm now. I just went hiking in the Flatirons a few weeks ago!

Did you check out the server explorer in VS .NET? I discovered you can do pretty much everything you'd want to do from there (it trims the functionality of the Enterprise Manager down to just what a developer would want to do).
 
No hiking for us in southern California. There are five wildfires around here. Have you heard about that? More than 2000 houses were burned down, 18 people dead included women ,children and 1 fire fighter. I think those people are so stupid and careless to set on these fires. Here, The sky is dark and ash everywhere, on the car, cloth and even get into poeple's lungs... no more outdoor games... :(.
I'll work on the asp .net tommrow and hope you can give me more advises.
Thanks and have a good nite,
le
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top