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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Changing ConnectionString

Changing ConnectionString

Scheduled Pinned Locked Moved ASP.NET
helpquestion
11 Posts 5 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.
  • S Offline
    S Offline
    sparlay_pk
    wrote on last edited by
    #1

    I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.

    A D S S 4 Replies Last reply
    0
    • S sparlay_pk

      I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Where did u created the connection string ? What is the problem to change the connectionString ?

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      S 1 Reply Last reply
      0
      • S sparlay_pk

        I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        Where have you defined that? How are you trying to change it?

        50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

        S 1 Reply Last reply
        0
        • A Abhijit Jana

          Where did u created the connection string ? What is the problem to change the connectionString ?

          Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

          S Offline
          S Offline
          sparlay_pk
          wrote on last edited by
          #4

          Bro I created a DataSet file. I added adapters on it. but when i trying to connect with the data base, the error is looks like this.. Login failed for user 'sa'. I have another database connetion which connect sucessfully but i have added the password in the connectionstring.

          S A 2 Replies Last reply
          0
          • S sparlay_pk

            Bro I created a DataSet file. I added adapters on it. but when i trying to connect with the data base, the error is looks like this.. Login failed for user 'sa'. I have another database connetion which connect sucessfully but i have added the password in the connectionstring.

            S Offline
            S Offline
            sparlay_pk
            wrote on last edited by
            #5

            I don't remember the exact thing, but the time i was adding the first adapter on dataset file, they ask me to exclude password for some security reason. and i excluded the password at that time.

            1 Reply Last reply
            0
            • S sparlay_pk

              Bro I created a DataSet file. I added adapters on it. but when i trying to connect with the data base, the error is looks like this.. Login failed for user 'sa'. I have another database connetion which connect sucessfully but i have added the password in the connectionstring.

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              sparlay_pk wrote:

              the error is looks like this.. Login failed for user 'sa'.

              Does the Database having the access of that Sa. Please check the database security settings from SQL Sever Management Studio. Are you able to login in SSMS using the same user name and password that you are using in your application ?

              Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

              S 1 Reply Last reply
              0
              • A Abhijit Jana

                sparlay_pk wrote:

                the error is looks like this.. Login failed for user 'sa'.

                Does the Database having the access of that Sa. Please check the database security settings from SQL Sever Management Studio. Are you able to login in SSMS using the same user name and password that you are using in your application ?

                Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

                S Offline
                S Offline
                sparlay_pk
                wrote on last edited by
                #7

                Yes it works for username sa and password abc... The time I am including new queries with adapter it shows data correctly. Also if i click on any adapter to preview data it works...

                1 Reply Last reply
                0
                • D dan sh

                  Where have you defined that? How are you trying to change it?

                  50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

                  S Offline
                  S Offline
                  sparlay_pk
                  wrote on last edited by
                  #8

                  Thanks Bro. I solved the problem...

                  1 Reply Last reply
                  0
                  • S sparlay_pk

                    I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.

                    S Offline
                    S Offline
                    sparlay_pk
                    wrote on last edited by
                    #9

                    Thanks Bro. I do it..

                    G 1 Reply Last reply
                    0
                    • S sparlay_pk

                      Thanks Bro. I do it..

                      G Offline
                      G Offline
                      Gamzun
                      wrote on last edited by
                      #10

                      It would be great if you can share with others, it might help someone.

                      Please don't forget to mark 'Good Answer', if you find it really a good one! Kashif

                      1 Reply Last reply
                      0
                      • S sparlay_pk

                        I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.

                        S Offline
                        S Offline
                        satalaj
                        wrote on last edited by
                        #11

                        you can refer the connection strings provided here www.connectionstrings.com Refer below article, it will let you create users and their roles in your MS SQL DB http://www.eggheadcafe.com/tutorials/aspnet/c4fa77c9-c3bb-4c16-b4ae-3be0ec6d760e/sql-server-security.aspx[^]

                        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