I created an application with a .mdf
database file (version 13.00.4001).
If I run application on the same computer where I have compiled it, everything works great. But if I try to run it on a second computer with SQL Server LocalDb 2016 installed, it doesn't work and says that SQL Server cannot be found on computer.
What's the problem? I can't understand why.
And if I try to run application on a PC where there is installed SQL Server 2014 LocalDB and 2016 the log says
cannot be opened because it is version 852. This server supports version 782 and earlier. A downgrade path is not supported
Really I can't understand why there are all these problems.
Code used to build connection string:
"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" +
Directory.GetCurrentDirectory() +
@"\Dati.mdf; Integrated Security=True"
I Solved my problem by deleting existing MSSQLLocalDB instance and re-create it with this command line
sqllocaldb delete MSSQLLocalDB
and
sqllocaldb create MSSQLLocalDB
and now all works great.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With