When trying to use a LocalDB, I get an error

  • I tried to find an appropriate forum to post the question. This one seems to be the closest. I'm sorry if I'm wrong.

    This is a long story, which I haven't time to go into now. I'm starting a new Blazor Web app using .NET 9 and include what's called Individual Accounts (or Individual Users, I can't remember which off the top of my head). That is a project template in Visual Studio. In this case it is Visual Studio 2022. Anyway, because it is a project template, it generates all of the SQL code to create a SQL Server LocalDB. As you probably know, this is a lightweight version of SQL Server. I expected it to do everything for me, however I'm wrong. This is the case where all the tutorials I've looked at, and I've looked at a lot of them, all assume that you know how to get whatever needs to be gone, in place. So, they don't bother to fill in the first steps. Anyway, I'm getting an error whenever I try to run the app. Here's the error:

    Unfortunately, I'm having a lot of problems just getting SSMS to work and Azure Data Studio to work, with anything at the office. My work machine is having A LOT OF PROBLEMS, and my desktop support aren't helpful. They've told me to uninstall SSMS and Azure Data Studio; so how am I supposed to do my job??????? Well, they just stare at me, and that's the end of it.

    So, anyway, can someone please help me with this?

    Rod

  • did you install SQLExpress to host your localdb ?

    ( Maybe even during your VS2022 install )

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • No, because I did not know I was supposed to install SQLExpress. I'll install SQLExpress, then give it another try.

    Thank you.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • @Johan Bijnens, it looks to me like installing SQLExpress has improved things. I still cannot access it via email SSMS or Azure Data Studio, but I think that's more a problem with my PC and like I mentioned above my desktop support team aren't inclined to help me. I'll try this from home.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • At a PowerShell prompt when I run

    sqllocaldb info mssqllocaldb

    I get the following response:

    Name: MSSQLLocalDB

    Version: 15.0.4382.1

    Shared name:

    Owner: TARDIS\rodf

    Auto-create: Yes

    State: Stopped

    Last start time: 1/8/2025 6:55:04 PM

    Instance pipe name:

    It looks right to me. Am I wrong about that?

    Addendum

    I tried running the ASP.NET Blazor app (not debugging it, for reasons that are obvious if you look in the code) and it worked fine. I found I could also open the LocalDB in SSMS fine. (I'm doing this all from home, where SSMS and Azure Data Studio all work fine. At the office I've run into a lot of problems using both SSMS and ADS against any database.)

    Thank you very much for your help!

    Rod

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply