How to use SQLite in c# without an ADO wrapper

与世无争的帅哥 提交于 2020-01-13 19:38:07

问题


Is this even possible? All of the aritcles I have read state that an ADO wrapper is necessary, but the SQLite website implies that nothing other than their DLL is needed. IF it is possible, then I would expect there to be code examples out there.


回答1:


Look here:

http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers

Specifically, search for ".NET Framework".

One of there wrappers there: http://www.phpguru.org/static/SQLite.NET.html - this one does not use ADO, it's just an extremely lightweight SQLite access library.

There's quite a few wrappers there, I'm sure you'll find one to your liking.




回答2:


Question is, why wouldn't you want to use an ADO.NET provider? It's the standard framework for accessing databases in .NET. I suppose you could use P/Invoke and access the SqlLite library, but thats a lot of work, and why reinvent the wheel when an ADO.NET provider already exists. ADO.NET is not just the plumbing for accessing database, it also provides a common pattern for accessing data, regardless of provider.

IMO, stick with the SqlLite ADO.NET Provider.




回答3:


Take a look at these two pages

http://adodotnetsqlite.sourceforge.net/

http://www.connectionstrings.com/sqlite

HTH



来源:https://stackoverflow.com/questions/2974058/how-to-use-sqlite-in-c-sharp-without-an-ado-wrapper

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!