The underlying provider failed on Open after deleting database files and sqllocaldb

Multi tool use
Multi tool use












5















I am investigating my experience of the issue here



When my Winforms XAF, Entity Framework Code First + Desktop Bridge application is installed via the Windows Store, it creates a database in the users directory.



If I delete the files then I will get an error when I try to re-run the application.



The underlying provider failed on Open


This is because I have not dropped the database properly.



As is explained in the linked issue.



I tried the fix of



sqllocaldb.exe stop MSSQLLocalDB
sqllocaldb.exe delete MSSQLLocalDB


But it did not fix the problem.
Moreover I cannot find the SQL Server instance to connect to ( via Management Studio 2017 ) In order to drop the database.



I have the following folders under c:Program FilesMicrosoft SQL Server



folders for sql server



[Update]



I tried running



sqllocaldb.exe info mssqllocaldb 


which gives Version 13.1.4001.0



to get an instance pipe name to use to connect via SQL Server Object Explorer
I was then able to create a new database of the same name, and then delete it.
However this did not solve my problem.



[Update]



The connection string is



"Integrated Security=SSPI;MultipleActiveResultSets=True;Data Source=(localdb)mssqllocaldb;Initial Catalog=mydatabase"


I have asked a related question here



I am now thinking that localdb is not supported for UWP










share|improve this question

























  • What does the connection string look like for the application? It would help in understanding where to look and how to access the store.

    – John Babb
    Dec 30 '18 at 11:55











  • Also check here depending on what version of local db you have you might be able to figure it out.

    – John Babb
    Dec 30 '18 at 11:57











  • Thanks @JohnBabb I updated the question.

    – Kirsten Greed
    Dec 30 '18 at 20:21
















5















I am investigating my experience of the issue here



When my Winforms XAF, Entity Framework Code First + Desktop Bridge application is installed via the Windows Store, it creates a database in the users directory.



If I delete the files then I will get an error when I try to re-run the application.



The underlying provider failed on Open


This is because I have not dropped the database properly.



As is explained in the linked issue.



I tried the fix of



sqllocaldb.exe stop MSSQLLocalDB
sqllocaldb.exe delete MSSQLLocalDB


But it did not fix the problem.
Moreover I cannot find the SQL Server instance to connect to ( via Management Studio 2017 ) In order to drop the database.



I have the following folders under c:Program FilesMicrosoft SQL Server



folders for sql server



[Update]



I tried running



sqllocaldb.exe info mssqllocaldb 


which gives Version 13.1.4001.0



to get an instance pipe name to use to connect via SQL Server Object Explorer
I was then able to create a new database of the same name, and then delete it.
However this did not solve my problem.



[Update]



The connection string is



"Integrated Security=SSPI;MultipleActiveResultSets=True;Data Source=(localdb)mssqllocaldb;Initial Catalog=mydatabase"


I have asked a related question here



I am now thinking that localdb is not supported for UWP










share|improve this question

























  • What does the connection string look like for the application? It would help in understanding where to look and how to access the store.

    – John Babb
    Dec 30 '18 at 11:55











  • Also check here depending on what version of local db you have you might be able to figure it out.

    – John Babb
    Dec 30 '18 at 11:57











  • Thanks @JohnBabb I updated the question.

    – Kirsten Greed
    Dec 30 '18 at 20:21














5












5








5








I am investigating my experience of the issue here



When my Winforms XAF, Entity Framework Code First + Desktop Bridge application is installed via the Windows Store, it creates a database in the users directory.



If I delete the files then I will get an error when I try to re-run the application.



The underlying provider failed on Open


This is because I have not dropped the database properly.



As is explained in the linked issue.



I tried the fix of



sqllocaldb.exe stop MSSQLLocalDB
sqllocaldb.exe delete MSSQLLocalDB


But it did not fix the problem.
Moreover I cannot find the SQL Server instance to connect to ( via Management Studio 2017 ) In order to drop the database.



I have the following folders under c:Program FilesMicrosoft SQL Server



folders for sql server



[Update]



I tried running



sqllocaldb.exe info mssqllocaldb 


which gives Version 13.1.4001.0



to get an instance pipe name to use to connect via SQL Server Object Explorer
I was then able to create a new database of the same name, and then delete it.
However this did not solve my problem.



[Update]



The connection string is



"Integrated Security=SSPI;MultipleActiveResultSets=True;Data Source=(localdb)mssqllocaldb;Initial Catalog=mydatabase"


I have asked a related question here



I am now thinking that localdb is not supported for UWP










share|improve this question
















I am investigating my experience of the issue here



When my Winforms XAF, Entity Framework Code First + Desktop Bridge application is installed via the Windows Store, it creates a database in the users directory.



If I delete the files then I will get an error when I try to re-run the application.



The underlying provider failed on Open


This is because I have not dropped the database properly.



As is explained in the linked issue.



I tried the fix of



sqllocaldb.exe stop MSSQLLocalDB
sqllocaldb.exe delete MSSQLLocalDB


But it did not fix the problem.
Moreover I cannot find the SQL Server instance to connect to ( via Management Studio 2017 ) In order to drop the database.



I have the following folders under c:Program FilesMicrosoft SQL Server



folders for sql server



[Update]



I tried running



sqllocaldb.exe info mssqllocaldb 


which gives Version 13.1.4001.0



to get an instance pipe name to use to connect via SQL Server Object Explorer
I was then able to create a new database of the same name, and then delete it.
However this did not solve my problem.



[Update]



The connection string is



"Integrated Security=SSPI;MultipleActiveResultSets=True;Data Source=(localdb)mssqllocaldb;Initial Catalog=mydatabase"


I have asked a related question here



I am now thinking that localdb is not supported for UWP







sql-server uwp localdb desktop-bridge project-centennial






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 30 '18 at 20:20







Kirsten Greed

















asked Dec 21 '18 at 0:59









Kirsten GreedKirsten Greed

2,988761116




2,988761116













  • What does the connection string look like for the application? It would help in understanding where to look and how to access the store.

    – John Babb
    Dec 30 '18 at 11:55











  • Also check here depending on what version of local db you have you might be able to figure it out.

    – John Babb
    Dec 30 '18 at 11:57











  • Thanks @JohnBabb I updated the question.

    – Kirsten Greed
    Dec 30 '18 at 20:21



















  • What does the connection string look like for the application? It would help in understanding where to look and how to access the store.

    – John Babb
    Dec 30 '18 at 11:55











  • Also check here depending on what version of local db you have you might be able to figure it out.

    – John Babb
    Dec 30 '18 at 11:57











  • Thanks @JohnBabb I updated the question.

    – Kirsten Greed
    Dec 30 '18 at 20:21

















What does the connection string look like for the application? It would help in understanding where to look and how to access the store.

– John Babb
Dec 30 '18 at 11:55





What does the connection string look like for the application? It would help in understanding where to look and how to access the store.

– John Babb
Dec 30 '18 at 11:55













Also check here depending on what version of local db you have you might be able to figure it out.

– John Babb
Dec 30 '18 at 11:57





Also check here depending on what version of local db you have you might be able to figure it out.

– John Babb
Dec 30 '18 at 11:57













Thanks @JohnBabb I updated the question.

– Kirsten Greed
Dec 30 '18 at 20:21





Thanks @JohnBabb I updated the question.

– Kirsten Greed
Dec 30 '18 at 20:21












1 Answer
1






active

oldest

votes


















0














With Management Studio 2017, if you run it as an admin, you should be able to connect to (localdb)MSSQLLocalDB with a trusted connection. This should bring up the service that will give you visibility to what databases are attached. From there you should be able to drop/create... do what is needed to config and set the context of the database.






share|improve this answer
























  • I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

    – Kirsten Greed
    Dec 30 '18 at 21:43











  • Double check by refreshing the explorer window at the server level.

    – John Babb
    Dec 30 '18 at 21:50











  • Thanks, that does not help.

    – Kirsten Greed
    Jan 16 at 18:34











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53877961%2fthe-underlying-provider-failed-on-open-after-deleting-database-files-and-sqlloca%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














With Management Studio 2017, if you run it as an admin, you should be able to connect to (localdb)MSSQLLocalDB with a trusted connection. This should bring up the service that will give you visibility to what databases are attached. From there you should be able to drop/create... do what is needed to config and set the context of the database.






share|improve this answer
























  • I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

    – Kirsten Greed
    Dec 30 '18 at 21:43











  • Double check by refreshing the explorer window at the server level.

    – John Babb
    Dec 30 '18 at 21:50











  • Thanks, that does not help.

    – Kirsten Greed
    Jan 16 at 18:34
















0














With Management Studio 2017, if you run it as an admin, you should be able to connect to (localdb)MSSQLLocalDB with a trusted connection. This should bring up the service that will give you visibility to what databases are attached. From there you should be able to drop/create... do what is needed to config and set the context of the database.






share|improve this answer
























  • I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

    – Kirsten Greed
    Dec 30 '18 at 21:43











  • Double check by refreshing the explorer window at the server level.

    – John Babb
    Dec 30 '18 at 21:50











  • Thanks, that does not help.

    – Kirsten Greed
    Jan 16 at 18:34














0












0








0







With Management Studio 2017, if you run it as an admin, you should be able to connect to (localdb)MSSQLLocalDB with a trusted connection. This should bring up the service that will give you visibility to what databases are attached. From there you should be able to drop/create... do what is needed to config and set the context of the database.






share|improve this answer













With Management Studio 2017, if you run it as an admin, you should be able to connect to (localdb)MSSQLLocalDB with a trusted connection. This should bring up the service that will give you visibility to what databases are attached. From there you should be able to drop/create... do what is needed to config and set the context of the database.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 30 '18 at 21:14









John BabbJohn Babb

8771018




8771018













  • I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

    – Kirsten Greed
    Dec 30 '18 at 21:43











  • Double check by refreshing the explorer window at the server level.

    – John Babb
    Dec 30 '18 at 21:50











  • Thanks, that does not help.

    – Kirsten Greed
    Jan 16 at 18:34



















  • I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

    – Kirsten Greed
    Dec 30 '18 at 21:43











  • Double check by refreshing the explorer window at the server level.

    – John Babb
    Dec 30 '18 at 21:50











  • Thanks, that does not help.

    – Kirsten Greed
    Jan 16 at 18:34

















I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

– Kirsten Greed
Dec 30 '18 at 21:43





I am able to connect to (localdb)MSSQLLocalDB but the database is not listed when it is created via the UWP program.

– Kirsten Greed
Dec 30 '18 at 21:43













Double check by refreshing the explorer window at the server level.

– John Babb
Dec 30 '18 at 21:50





Double check by refreshing the explorer window at the server level.

– John Babb
Dec 30 '18 at 21:50













Thanks, that does not help.

– Kirsten Greed
Jan 16 at 18:34





Thanks, that does not help.

– Kirsten Greed
Jan 16 at 18:34


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53877961%2fthe-underlying-provider-failed-on-open-after-deleting-database-files-and-sqlloca%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







mgIx oOkIZ,4P,q3HHSC20uIv14r9,nDKkjhKeA7x4PiO1cY cDo9,H4wy6JB,v3InzzzL02A,3qtYH9QqbFcRKf
lp6zp8Uf091,zSr 69Wxh2Co9U220Nkss yQUUzdVWPLPNLv31YADy KQLol,oljZisbmD7j8JW9aRZn MY5B6ySkf,hAAOH W,DIFy

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas