SQL server does not exits....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lily86
    New Member
    • Aug 2008
    • 16

    SQL server does not exits....

    i have 1 new .aspx page where i run on my local host it can run normally but when i run at another computer it show the error:



    here is my connection:
    Code:
                conn5 = New SqlConnection(ConnStr)
                cmd5 = New SqlCommand(lsSQLSTRX, conn5)
                adp5 = New SqlDataAdapter(cmd5)
                lds5 = New DataSet
                DT5 = New DataTable
                adp5.Fill(lds5, "x")
                DT5 = lds5.Tables(0)
    
    ConnStr = "data source=" & Trim(lsSAL_SERVER) & ";initial catalog=" & Trim(lsSAL_DATABASE) & ";password=" & Trim(lsSAL_PASSWORD) & ";user id=" & Trim(lsSAL_USERID) & ";"
    anyone know please help me...thanks...
    Last edited by pbmods; Feb 7 '09, 06:55 AM. Reason: Added CODE tags.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    You have to connect to your sql server from your web server. Your connection string does not include your server name/setting. so it's looking for a local server or the server residing in the same box.

    -- CK

    Comment

    • lily86
      New Member
      • Aug 2008
      • 16

      #3
      thanks for ur reply...

      thanks for your reply... but can i know how to write the code with include the server.....

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        Here are some useful links


        Connection Strings

        DSN-Less Connections

        Comment

        • lily86
          New Member
          • Aug 2008
          • 16

          #5
          thanks...i get the solution....

          Comment

          Working...