dcsimg
Results 1 to 5 of 5

Thread: Save login info in vs2019 sql queries

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2016
    Posts
    78

    Save login info in vs2019 sql queries

    Iím not really sure how to ask this question, but here we go. I just installed a new hard drive in my laptop, so decided to load vs2019 for the first time. When I pulled up an existing project, I was pleased to see sql queries that I had saved in the project folder in the solution explorer. I opened one of my existing queries I created in sql server management studio queries and figured out how to run it with the triangle at the top of the query in the visual studio screen. It asked me to enter the server, the server id, password and the database. Once I entered the information, it ran as expected. When I saved it and reopened it , I had to enter the login information again. Is there a way to save the login information with the query so I donít have to login each time? Thanks!
    I don't program, I beat code into submission!!!

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,722

    Re: Save login info in vs2019 sql queries

    The dialogue that opens when you run the query has a History tab, so your previous connection properties are already saved automatically.

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,722

    Re: Save login info in vs2019 sql queries

    Note also that if you click Connect on the toolbar instead of Execute then you can open a previous or new connection and then that connection will be used each time you click Execute.

    Note that I have never even seen that dialogue before as I've never opened a SQL file in VS 2019. I simply opened a file and explored a bit. It took me only a few minutes to work that stuff out.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2016
    Posts
    78

    Re: Save login info in vs2019 sql queries

    Thank you. I wish I was as clever as you seem to be.
    I don't program, I beat code into submission!!!

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,722

    Re: Save login info in vs2019 sql queries

    Quote Originally Posted by vbcub View Post
    I wish I was as clever as you seem to be.
    It's not about being clever. The very point of my comment was that if I can find that information with a bit of exploration then you can to. You just have to be prepared to make that small effort rather than throw your hands up at the first sign of the unknown. Everything you needed was right in front of you but you didn't bother to look at it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width