Results 1 to 2 of 2

Thread: SQL server does not exist or access denied

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    SQL server does not exist or access denied

    Hello

    I have set up a SQL database and a ASP.Net application.
    When l click on a button to fill a datagrid with data from a table
    in the database i get this error message when l try to open the
    database connection. This is my code

    Code:
    'Setup our core objects, mainly for use with our database
    Dim objConnection As New SqlClient.SqlConnection("server=.;database=keepFit;trusted_connection=true")
    Dim objCommand As New SqlClient.SqlCommand("Select * from Members", objConnection)
    Dim objReader As SqlClient.SqlDataReader
    
    'Open our database connection
    objConnection.Open() //Error - SQL server does not exist or access denied
    Many thanks in advance

    Steve
    steve

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Unless the name of your SQL Server is . then the error is correct, the server doesn't exist. Put a proper name in there or change the name of your SQL Server isntance.

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