A summary of the. NET C # call to SQLite

Source: Internet
Author: User
Tags sqlite

--Previous Notes

Because of their own password too much and not easy to remember, the regular will forget. So want to find a management software management, available online download worry insecure. So I began to write a personal password management software.

Because what I've been doing is web development, it's not a lot to know about WPF. WinForm wrote software in universities. What about the database? Initially want to use MSSQL but it is not convenient to copy mobile, and the premise to install mSQL software. Later I thought of using SQLite, which makes it easy to copy mobile and not need to install any software. Another code management tool is my own github.

Because the first time with SQLite as a database, so what a variety of inexplicable anomalies. I looked up some online, but some of them were completely different from what I met.

Development environment: Win x64, VS2013 UP5

My Project framework:

The references between them are as follows:

The Mypasswordmanage UI layer references the following class libraries (BLL, Common, Model)

PASSWORDMANAGE.BLL Business Layer References (Common, DAL, Model)

Passwordmanage.dal data-tier references (Common, Model)

Because my machine is 64 bits, I started by downloading the Sqlite-netfx45-binary-bundle-x64-2012-1.0.97.0.zip package and referencing the System.Data.SQLite.dll in the DAL layer.

Can be in the compile times a following error

On the internet, someone said to change the platform target of the project referencing the DLL to x86, and to use Sqlite-netfx45-binary-bundle-win32-2012-1.0.97.0.zip to change the platform to 32-bit , as well as referencing the 32-bit SQLite DLL.

Finally, the problem cannot be solved. Finally I wrote a demo and not layered, the data read and write and business logic are written on the UI layer, a layer. This will stop the error. In addition, when connecting to the SQLite library, write to note:

That's what we usually write.

This will say an invalid connection string. Then you can read the following wording instead.

The above is my own personal encounter some of the problems summarized.

found that with SQLite can not be layered do not know why, good strange. If the use of sqlite developed, and can be implemented layered, please share next AH! ^-^

A summary of the. NET C # call to SQLite

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.