Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. connecting to database is a serious problem

connecting to database is a serious problem

Scheduled Pinned Locked Moved ASP.NET
databasesecuritysql-serversysadminhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hemant Garg
    wrote on last edited by
    #1

    Hello to every One, i'm using database in my web form for login and user purpose.. due to some reasons i have to format my pc. after that when i again re-install sql server 2000 and visual studio7 i'm unable to connecto to the database in the following line: Protected sqlconnection1 As SqlConnection = New SqlConnection("data source=.;initial catalog=daccrop;persist security info=False;user id=dac1605;pwd=dac1605;workstation id=self;packet size=4096") Actually i have changed the server and computer name in my new installation i.e from "DAC_147_347" to "garg" and again i don't remember how the authentication was done i.e windows or by sql server login. Following is the modified coding for connecting to database.. Protected sqlconnection1 As SqlConnection = New SqlConnection("data source=GARG;initial catalog=dac1605;integrated security=SSPI;persist security info=False;workstation id=GARG;packet size=4096") This is still not working.. suggest me how should i know the setting done in sql server and after knowing how should i implement it. Thank You..

    W 1 Reply Last reply
    0
    • H Hemant Garg

      Hello to every One, i'm using database in my web form for login and user purpose.. due to some reasons i have to format my pc. after that when i again re-install sql server 2000 and visual studio7 i'm unable to connecto to the database in the following line: Protected sqlconnection1 As SqlConnection = New SqlConnection("data source=.;initial catalog=daccrop;persist security info=False;user id=dac1605;pwd=dac1605;workstation id=self;packet size=4096") Actually i have changed the server and computer name in my new installation i.e from "DAC_147_347" to "garg" and again i don't remember how the authentication was done i.e windows or by sql server login. Following is the modified coding for connecting to database.. Protected sqlconnection1 As SqlConnection = New SqlConnection("data source=GARG;initial catalog=dac1605;integrated security=SSPI;persist security info=False;workstation id=GARG;packet size=4096") This is still not working.. suggest me how should i know the setting done in sql server and after knowing how should i implement it. Thank You..

      W Offline
      W Offline
      WillemM
      wrote on last edited by
      #2

      Are you getting any errormessages? It might give me a clue as to what is going on.

      WM. What about weapons of mass-construction? "What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson My blog

      H 1 Reply Last reply
      0
      • W WillemM

        Are you getting any errormessages? It might give me a clue as to what is going on.

        WM. What about weapons of mass-construction? "What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson My blog

        H Offline
        H Offline
        Hemant Garg
        wrote on last edited by
        #3

        The Error messages is: "Sql server i does not exist or access is denied"

        W 1 Reply Last reply
        0
        • H Hemant Garg

          The Error messages is: "Sql server i does not exist or access is denied"

          W Offline
          W Offline
          WillemM
          wrote on last edited by
          #4

          Check if the database exists and also check if you have access. Normally you have administrator access on your local machine using windows logon credentials, so the following connectionstring should work. "Data Source=localhost;Initial Catalog=dac1605;Integrated Security=SSPI"

          WM. What about weapons of mass-construction? "What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson My blog

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups