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. Database & SysAdmin
  3. Database
  4. Connecting to a database is a serious problem to me

Connecting to a database is a serious problem to me

Scheduled Pinned Locked Moved Database
databasesecurityhelpsql-serversysadmin
2 Posts 2 Posters 1 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. The Error shown to me is: "SQL server does not exist or access is denied" Thank You..

    R 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. The Error shown to me is: "SQL server does not exist or access is denied" Thank You..

      R Offline
      R Offline
      Rob Graham
      wrote on last edited by
      #2

      Use Enterprise manager to view the Server properties and see how security is set up. If it is set up for windows authentication, then change your connection to use that. If Sql server or mixed, then use EM to view the logins, and find the login you wish to use. Reset the password, then update your connection string.

      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