Visual Studio 2022 and database issues, are others having trouble as well?

Andrew Innes 51 Reputation points
2021-11-16T04:34:18.827+00:00

Sometimes I can get the database working properly in Visual Studio 2022, but too frequently it fails. Then it screws everything up in the database!!

Normally in 2019 VS there is absolutely no problems with the database which is running locally on my machine using SQL 2014.

The new interface to databases is a bit different than the 2019 and that seems to be a problem. First instead of just autmatically knowing the attached database is using 2014, frequently VS22 tries to use one of the local server engines. This is frustrating because the connection string is there.

I tired to go in and manually select the engine and other settings. But this resulted in my being locked out due to authorization issues. Now the database and the SQL2014 are using Windows Authorization so what is that all about? No problems like this with VS19.

The fix has been to delete the database from VS22 and then go into the SQL management Studio and reset up the database connection to the server. In some cases I had to use a backup copy of the database because the one that was in use became corrupted by VS22.

The really frustrating part of this is it will be working and then when I get out of VS22 and later reload, the reload seems to create the issue.

From a programming standpoint, I use VB.net, the VS22 seems to be faster and improved over 2019 version. And I like that the 64 bit adds so much capability for large programs.

When running from my code, I have seen no database issues. It is only when using the server explorer in Visual Studio 2022 that the issues flare up.

Perhaps there are some settings that can be made in VS22 to prevent these problems?

Currently I am going back to using 2019 as I can not waste time with database issues like this.

Help!

Thanks for reading this.

Developer technologies | Visual Studio | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Andrew Innes 51 Reputation points
    2021-11-17T00:51:18.943+00:00

    It was very straight forward. I have a database that is not attached that I use SQL 2014 with. My software I have also tested with SQL 2019 and it works fiine with that, if it works better with VS22 I could change the database engine.

    I then setup the database in Visual Studio 2022 and at first it worked fine. But then I exited the VS and returned later. On trying to log back in I discovered the database was pointed at a desktop version SQL engine instead of the 2014. I went into the dataconnection and changed it to SQL2014, but then it would not let me in with the security error messages even tho it is on Windows Authenticaion.

    I could not fix the error in VS. So i exited VS and went into SQL management software and replaced the now damaged database with a backup copy. I then attached the database thru the management features of SQL and I was able to get back into the database. I then loaded VS22 and was able to get into the database.

    Then the same problems happened again in the same way as before.

    Went back to using 2019 VS and have not had any issues.

    I like what I see of the coding platform in 2022 and the fact it is 64 bit, but the database stuff is critical for my work.


  2. Andrew Innes 51 Reputation points
    2021-11-18T04:24:44.253+00:00

    Thank you for the suggestion. I went into the installer and noticed there was an update available so I installed that and then ran the repair as per the instructions you were kind enough to send.

    I will then test this tomorrow to see if the database issues have been cleared up.

    I will report the results of the testing back.

    Thanks again I have my fingers crosse d that these actions will fix the issues.

    0 comments No comments

  3. Andrew Innes 51 Reputation points
    2021-11-18T11:49:10.797+00:00

    So far so good.

    I have done minimal testing but the database interface seems to be working normally.

    I guess we will never know if the update fixed the problem or the fix fixed it. If others have this problem I recommend doing both. Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.