Results 1 to 3 of 3

Thread: ASP .Net / SQL Server 2000 Connection Problems [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2002
    Location
    Dallas
    Posts
    50

    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:
    1. Dim mySqlConnection As New SqlConnection()
    2.         mySqlConnection.ConnectionString = "Data Source=(local); initial Catalog=House_db; Integrated Security=SSPI"
    3.         mySqlConnection.Open()
    4.         MsgBox("Success")
    5.         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!

  2. #2
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    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.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2002
    Location
    Dallas
    Posts
    50
    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
  •  



Click Here to Expand Forum to Full Width