Let Pdf.net support the latest SQLite database

Source: Internet
Author: User
Tags sqlite database connectionstrings

  In the recent project used in SQLite, the previous project used a combination of Pdf.net+mysql, has written a lot of code, if you can write good code directly on the SQLite on the good, PDF. NET supports most of the mainstream databases, this of course can, but I found that The current release of the compiled Pdf.net library does not support the latest SQLite, directly replace the DLL under the output path is not working, so the pdf.net source code to download, replace the latest System.Data.SQLite.dll, and then recompile, the steps are as follows:


1. Download pre-compiled System.Data.SQLite.dll (http://system.data.sqlite.org/index.html/doc/trunk/www/ Downloads.wiki), 32-bit and 64-bit to download, as to choose which version of the. NET depends on what you need, Pdf.net comes with the 3.5 version.


2, download pdf.net the latest source code (http://www.pwmis.com/SqlMap/), Delete the SQLite directory under the Refdll directory of Pdf.net, create a new x86 and x64 two directories, put in the two directories respectively, the corresponding 32-bit and 64-bit versions of SQLite.Interop.dll that were previously downloaded, and put the corresponding refdll in the System.Data directory . SQLite.dll (This does not distinguish between 32-bit or 64-bit, whichever you put, as long as the previous SQLite.Interop.dll version and path lil bit can be)


3. Finally change the Pdf.net PWMIS.DataProvider.Data.SQLite project under the referenced System.Data.SQLite.dll can, of course, replaced by our previous Refdll under the System.Data.SQLite.dll


4. Configure Pdf.net to use SQLite connection string
<connectionStrings>
<add name= "Default" connectionstring= "Data source=.\app_data\1.db" Providername= "Pwmis". Dataprovider.data.sqlite,pwmis. Sqliteclient "/>
</connectionStrings>


5, with Debug+any CPU mode, in WIN7 64-bit and XP under test can be normal use


To summarize:
Pdf.net+mysql combination of code written directly with the pdf.net+sqlite combination of completely no problem, like one!
MySQL to SQLite words suggest use navicat premium feel good!

Finally, a pdf.net download with the latest version of the SQLite database supported by a. NET 4.0-based compiled

Http://pan.baidu.com/s/1dDkXRoP

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.