WinForms 应用程序数据存储的替代方案 - SqlCE 的许多问题
我正在努力使 SqlCE 本地数据库在我的 winforms 项目中工作。
我习惯使用网络应用程序,这是我的第一个桌面应用程序,在了解了很多技巧之后,例如在调试时在本地数据库中插入数据时,数据会进入 bin/debug 文件夹内的神奇数据库 - 那我自己永远不会想 - 从昨天到现在,我再次启动我的项目,猜猜有什么新技巧?数据库丢失了 ??!!
突然我的项目无法识别自己的数据库路径,并抛出一个错误:“该路径不是来自合法形式”,我发誓从昨天开始工作时我没有移动鼠标。
不管怎样,SqlCE 已经让我很头疼了,我做这个项目是为了给一家慈善机构内的一家书店一个忙,我希望这个项目只有一个周末——但它已经没有了。
那么,由于我没有大量数据要存储,那么在没有 .sdf 文件的情况下存储这些数据的替代方案是什么?
I am struggling to make a SqlCE local database to work in my winforms project.
I`m used to work with web app, this is my first desktop app, and after understand a lot of tricks like when you insert data in your local database while debugging, the data goes to a magic database inside bin/debug folder - that I would never wonder by myself - and from yesterday to now, I launch my project again, and guess what the new trick? The database got lost ¬¬ !!
Suddenly my project can't recognize its own path to the database and it throws me an error: "The path is not from a legal form", I SWEAR I didn't move the mouse from yesterday when it was working from now.
Anyway, SqlCE gave me a lot of headaches already, I'm doing this project as a favor to a bookstore inside a charity house and I'd like this project gets only one weekend - it already didn't.
So, as I don`t have a big amount of data to store, what would be the alternatives to store this data without a .sdf file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你想继续使用 SQL,我会推荐 SQLite。体积小、重量轻,结果放置在一个文件中。
http://sqlite.org/
If you want to stay with SQL I would recommend SQLite. Small, lightweight and results are placed in a single file.
http://sqlite.org/