|
-
Jan 2nd, 2003, 03:05 PM
#1
Thread Starter
Fanatic Member
sql server problem
hi,
i am trying to do the first sql server example in Karl Moores book but when i try loading the datagrid with data from the KeepFit SQL database i get the following error:
"SQL Server does not exist or access denied."
I know it's there tho! Has anybody else had a problem like this?
Many thanks
Nick
-
Jan 2nd, 2003, 06:53 PM
#2
PowerPoster
Check your sql server permissions. Also, what does your connection string look like. Try using the system administrator (sa) acccount just to get it working then switch it to however authentication you like.
-
Jan 3rd, 2003, 07:37 AM
#3
Thread Starter
Fanatic Member
the connection string i am using is
Code:
Dim objConnection As New SqlClient.SqlConnection("server=.;database=KeepFit;trusted_connection=true")
how do i check/change the permissions of the database?
-
Jan 3rd, 2003, 12:35 PM
#4
Thread Starter
Fanatic Member
i changed the connection string to the following:
Code:
Dim objConnection As New SqlClient.SqlConnection("server=LAPTOP1-NICK\NETSDK;database=KeepFit;trusted_connection=true")
i know get an error of:
"Login failed for user 'LAPTOP1-NICK\ASPNET'. "
Am i getting any closer?????
HELLLLLLLLLLLLLLP!
-
Jan 3rd, 2003, 01:48 PM
#5
PowerPoster
If you are using asp.net, grant rights to the aspuser for the database. Or, for a quick work around, use the sa account for your userid and supply the password.
-
Jan 3rd, 2003, 01:50 PM
#6
Lively Member
I have just finished the same chapter without any problems. Are you sure that the server is running. I have the same exact message if the server is not running.
Can you read the database from the server explorer ?
The server and the server Agent should both be running. Can you check from the server Manager.
Mine worked using exactly the same syntax as in your first command line, that is the one in the book. If I were you I check that I can work on the tables with Enterprie manager and Server Explorer from VB.net.
-
Jan 3rd, 2003, 02:05 PM
#7
Thread Starter
Fanatic Member
thanks for the replies.
Both services are definetly running, and i can view the database from the server explorer window.
how do i go about granting user rights or using the sa account?
I couldn't get the access database example working with asp.net for similar reasons! :S
-
Jan 3rd, 2003, 02:20 PM
#8
Member
VB Code:
Dim objConnection As New SqlClient.SqlConnection("server=LAPTOP1-NICK\NETSDK;database=KeepFit;user id=sa;password=###")
Where ### is your password if one is set.
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 3rd, 2003, 02:23 PM
#9
Thread Starter
Fanatic Member
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
I get that now!!!
I think i am gonna cry!
-
Jan 3rd, 2003, 02:29 PM
#10
Member
VB Code:
Dim objConnection As New SqlClient.SqlConnection("server=LAPTOP1-NICK\NETSDK;database=KeepFit;user id=sa;password=###;integrated security=true;persist security info=true")
Where ### is your password if one is set.
(Forgot part of it ... not sure it'll help though)
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 3rd, 2003, 02:35 PM
#11
Thread Starter
Fanatic Member
i've never been asked for a password so i pressume there isn't one.
do i just put two '' if there isn't one?
-
Jan 3rd, 2003, 02:37 PM
#12
Member
just remove the ';password=' from the string
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 3rd, 2003, 02:41 PM
#13
Thread Starter
Fanatic Member
still says
Login failed for user 'LAPTOP1-NICK\ASPNET'
-
Jan 3rd, 2003, 02:48 PM
#14
Member
Are you using MSDE or Microsoft SQL?
It looks like you are using MSDE.
Do you have Enterprise Manager under Microsoft SQL Server in the start menu?
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 3rd, 2003, 02:57 PM
#15
PowerPoster
Your connecting via anonymous access. This is why the ASPNET user is failing. He doens't have rights to the database.
-
Jan 3rd, 2003, 03:01 PM
#16
Member
Thus why I am trying to find out if he has the ability to grant ASPNET user database access. Enterprise manager does not come with MSDE to the best of my knowlege.
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 3rd, 2003, 03:04 PM
#17
Thread Starter
Fanatic Member
-
Jan 3rd, 2003, 03:25 PM
#18
Member
Since you are using MSDE you don't have the benefit of a graphical interface.
In order for you to add/modify accounts in MSDE you have to use the instructions found here:
http://support.microsoft.com/default...;en-us;325003&
It is not a very nice thing for MS to do this to users but ...
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 3rd, 2003, 03:46 PM
#19
Thread Starter
Fanatic Member
man that's ****!!!!!!!!!
bloomin microsoft!
-
Jan 3rd, 2003, 07:04 PM
#20
Thread Starter
Fanatic Member
i've tried doing the stuff in the microsoft document but to no avail.
think i am gonna give up
not sure how other people got it to work and yet i can't.
the only think i can think of is because i have xp home. I had to do a crack to get IIS running on it so perhaps that is it. It runs normal ASP pages ok though.
-
Jan 4th, 2003, 02:32 AM
#21
Lively Member
SQL
I am not using MSDE I am using SQL personal edition. I think MS should have included some sort of Interface for MSDE as well, else I think it will never take on and people keep preferring Access to SQL.
If I were you I will try to get some sort of interface, but from VB.net you should be able to log in through serer explorer.
-
Jan 4th, 2003, 10:53 AM
#22
Thread Starter
Fanatic Member
where can i get sql personal edition from and how much does it cost?
-
Jan 4th, 2003, 03:48 PM
#23
Member
Just download the trial version (120 day timebomb).
http://www.microsoft.com/sql/howtobuy/trial.asp
Eagle Eye
"Programming is easy ... when you are done."
-
Jan 4th, 2003, 05:07 PM
#24
Thread Starter
Fanatic Member
downloaded
http://www.asp.net/webmatrix/
and can get asp.net pages working on XP home!
HURRRRAH!
-
Jan 4th, 2003, 07:59 PM
#25
PowerPoster
I had this problem also, what fixed it for me was switching to mixed mode authentication.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|