问题描述
我目前正在为我策划一个项目的一些评估工作。
I'm currently working on some evaluation work for a project that I'm planning.
我最近查了一下解决方案的数据存储机制,我的应用程序,并同时在SQLite的研究栽了跟头。我目前使用的SQLite与System.Data.SQLite包装。
I recently looked at solutions for a data storage mechanism for my application and while researching stumbled upon SQLite. I currently use SQLite with the System.Data.SQLite wrapper.
我真的很喜欢的方式,它的作品,但我有一个问题,这是我无法获得固定的,我还没有发现在互联网上关于我的问题的帮助。
I really like the way it works but I have one problem with it that I couldn't get fixed and I also found no help concerning my problem on the internet.
我想我的SQLite数据库嵌入到我的应用程序的DLL(即Title.Storage.dll)之一,在此DLL中使用。这可能吗?
I would like my SQLite Database to be embedded into one of my applications DLLs (ie. Title.Storage.dll) to be used within this DLL. Is this possible?
我怎样才能访问数据库呢?
How can I access the database then?
这将是巨大的,如果我可以使用类似:
It would be great if I could use something like:
SQLiteConnection con = new SQLiteConnection();
con.ConnectionString="DataSource=Title.Storage.storage.db3";
con.Open();
在此先感谢和最诚挚的问候,
Thanks in advance and best regards,
3Fox
推荐答案
这是装配不用于文件存储,它是为code储存。虽然你可以在组装存储的文件,它们是只读的。
An assembly isn't for file storage, it's for code storage. While you can store files in an assembly, they are read only.
这篇关于我怎么可以嵌入在.NET的DLL SQLite数据库,然后将它从C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!