Let pdf.net support different versions of the SQL Server Compact database

Source: Internet
Author: User
Tags compact connectionstrings

in recent projects need to use embedded database, we choose the data Development Framework is pdf.net (http://www.pwmis.com/SqlMap/), The previous blog post has been summed up to let Pdf.net support the latest sqlite, today we summarize how to let pdf.net support different versions of the SQL Server Compact database. Pdf. NET supports most of the mainstream databases, the SQL Server Compact is no exception, but pdf.net only supports SQL Server Compact 4.0, and the SQL Server Compact is not backwards compatible, to enable pdf.net to support SQL The Server Compact 3.5 requires that the source code be re-modified and compiled.
The method of modification is very simple, download Pdf.net source code (http://www.pwmis.com/SqlMap/), Locate the Pwmis.core project and find the System.Data.SqlServerCe in its project reference, and you will find that the DLL is pointing to version 4.0, so that it can support version 3.5 as long as the DLL is replaced by 3.5.
PDF. NET connection string for the SQL Server Compact is
<connectionStrings>
<add name= "Default" connectionstring= "Data source=.\n.sdf; Persist Security info=true "Providername=" Pwmis. Dataprovider.data.sqlserverce,pwmis. Core "/>
</connectionStrings>
Note that at the time of deployment, the computer to install the SQL Server compact corresponding program, although there are articles on the Internet that can not be installed, but I measured it myself, or to install.
I found that there is no support like the local Database cache in the version after VS2012, fortunately I found an open source project, is to achieve a similar function, here to provide the address HTTP// sqlcetoolbox.codeplex.com/

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.