Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in EF Tutorial #3285

Closed
JN-LT opened this issue Jun 7, 2021 · 11 comments · Fixed by #3298
Closed

Error in EF Tutorial #3285

JN-LT opened this issue Jun 7, 2021 · 11 comments · Fixed by #3298

Comments

@JN-LT
Copy link

JN-LT commented Jun 7, 2021

Do I just ignore the "SQLite Error 14: 'unable to open database file'" error message, or was that not supposed to happen?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@JN-LT
Copy link
Author

JN-LT commented Jun 7, 2021

image

@Cameron-Gonzalez
Copy link

Did you ever figure this out? I was having the same issue.

@JN-LT
Copy link
Author

JN-LT commented Jun 7, 2021

Did you ever figure this out? I was having the same issue.

Nope. I'm looking for a better tutorial.

@Rick-Anderson
Copy link
Contributor

Is that a valid path for your OS? That's a windows path.

change => options.UseSqlite(@"Data Source=C:\blogging.db"); to
=> options.UseSqlite(@"Data Source=blogging.db");

@JN-LT
Copy link
Author

JN-LT commented Jun 8, 2021 via email

@ajcvickers
Copy link
Contributor

@JN-LT Is it possible that you don't have permissions to create files in the root of C:?

@JN-LT
Copy link
Author

JN-LT commented Jun 8, 2021 via email

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Jun 8, 2021

@ajcvickers I think we should use an OS independent and reliable path AND COMMENT ALTERNATIVES

@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 8, 2021

The issue is that there is no good general path, that cannot be misunderstood.

Like: C:\Users<YourName><FolderName>

Opens up for a universe of misunderstandings.

@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 8, 2021

Or add code that detects the platform and sets a suitable connection string? 😂

@smitpatel
Copy link
Contributor

Or just put a dummy path which never works so user can put a path which they have access to in the OS they have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants