|
-
Jul 1st, 2004, 12:40 AM
#1
Thread Starter
Member
ASP .Net / SQL Server 2000 Connection Problems [Resolved]
I've tried searching for my answer on the forums - and all I can find is Access questions..
My problem is, I assume my connection string, I get an error upon executing my VB.Net/ASP.Net project and i've tried rewriting it [connection string] and still no luck..
My server (Machine) name = THEBEAST 'It's a local server
My Named SQL Server Instance = BEASTDATA
The Database i've created for this project = House_db
The Username = House_DBUsr
The Passsword = nottellin
I've created the user - and i'm using SQL Server 2000 authentication.
When the page loads, I want it to connect to the server - grab some data - and then close the connection.. and for some reason I get the error "Database does not exist or access denied"
VB Code:
Dim mySqlConnection As New SqlConnection()
mySqlConnection.ConnectionString = "Data Source=(local); initial Catalog=House_db; Integrated Security=SSPI"
mySqlConnection.Open()
MsgBox("Success")
mySqlConnection.Close()
I got the same error with this Con string.
"Server=(local);Database=House_db;Uid=House_DBUsr;Pwd=nottellin;"
I got that from connection strings.com
The user, has of course, been created on my SQL server installation - as well as the DB.
Any suggestions?
And yes, I've Imported the System.Data.SqlClient namespace(s)
-Kedaeus-
Last edited by Kedaeus; Jul 2nd, 2004 at 12:24 AM.
What do you mean it doesn't work? I had it working just a minute ago!
-
Jul 1st, 2004, 05:47 AM
#2
Fanatic Member
This is caused by not setting the correct permissions in SQL Server.
Make sure you give the appropriate user (probably ASPnet user) permissions on the database you are using.
-
Jul 2nd, 2004, 12:25 AM
#3
Thread Starter
Member
Thank you
What do you mean it doesn't work? I had it working just a minute ago!
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
|