.NET Compact Framework Data Provider for SQL Server Mobile

    • Standard

      Data Source=MyData.sdf;Persist Security Info=False;

        SQL Server Compact
    • How to specify the location of the SDF file

      Often times the .SDF database is not running in the current directory so it becomes necessary to programatically set the path to the SDF file. This is an example (.net C#) on how to do this when the SDF file is located in the same directory as the executing application.

      Data Source=" + System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\MyData.sdf;
      Persist Security Info=False;

        SQL Server Compact
    • Specifying the maximum database size

      The maximum size of the database is by default 128 MB. Override this by using the following connection string.

      Data Source=MyData.sdf;Max Database Size=256;Persist Security Info=False;

        SQL Server Compact
    • Specifying the maximum buffer size

      The largest amount of memory that can be in use before the server starts flushing changes to disk is by default 640 kB. Override this by using the following connection string.

      Data Source=MyData.sdf;Max Buffer Size=1024;Persist Security Info=False;

        SQL Server Compact
    • Encryption enabled

      Use this connection string to enable encryption on the database.

      Data Source=MyData.sdf;Encrypt Database=True;Password=myPassword;
      File Mode=shared read;Persist Security Info=False;

      The Encrypt Database="True" pair is really not necessary as the presence of the Password-parameter itself turns on encryption for the connection.

      SQL Server Compact
    • Exclusive access

      Use this one to disallow other processes from opening or modifying the database while you have it open.

      Data Source=MyData.sdf;File Mode=Exclusive;Persist Security Info=False;

        SQL Server Compact
    • Read only access

      Use this one to open a read-only copy of the database.

      Data Source=MyData.sdf;File Mode=Read Only;Persist Security Info=False;

        SQL Server Compact
    • Exclusive but shared for reading

      Use this one to allow other processes to read, but not modify, the database while you have it open.

      Data Source=MyData.sdf;File Mode=Shared Read;Persist Security Info=False;

        SQL Server Compact
    • Specifying the maximum temp file size

      The maximum size of the temporary database file is by default 128 MB. Override this by using the following connection string.

      Data Source=MyData.sdf;Temp File Max Size=256;Persist Security Info=False;

        SQL Server Compact
    • Case sensitive database

      Upon database creation the default is case insensitive, use this one for a case sensitive database.

      Data Source=MyData.sdf;Case Sensitive=True;Persist Security Info=False;

      This allows you to have multiple values, wich only deffer in lower / upper case, in a unique column.

      This setting is a database creation time option and is ignored when connecting to an existing database

.NET Compact Framework Data Provider for SQL Server CE的更多相关文章

  1. Data Provider 中没有.net framework Data provider for Mysql 的解决方法

    近来做的一个项目中,数据库用的是 MySql, 而在项目使用 Entity Data Model 来做数据服务层,可是在项目中添加 Data Entty Model 时,一般我们都会选择从数据库中直接 ...

  2. 解决VS2010在新建实体数据模型出现“在 .NET Framework Data Provider for Microsoft SQL Server Compact 3.5 中发生错误。请与提供程序供应商联系以解决此问题。”的问题

    最近想试着学习ASP.NET MVC,在点击 添加--新建项--Visual C#下的数据中的ADO.NET 实体数据模型,到"选择您的数据连接"时,出现错误,"在 .N ...

  3. SQL SERVER 遇到Unable to find the requested .Net Framework Data Provider. It may not be installed. (System.Data)

    今天新装的SQLSERVER 2012 EXPRESS 用于客户端程序 安装完成后打开登陆SQLSERVER 一切正常 当查看表定义.视图结构时,弹出一下内容 Unable to find the r ...

  4. 找不到请求的 .Net Framework Data Provider。可能没有安装.

    学习中遇到的问题: 找不到请求的 .Net Framework Data Provider.可能没有安装. 找到的解决方法 解决方法: 安装Microsoft SQL Server Compact 4 ...

  5. .Net Framework Data Provider可能没有安装

    方法一.下载SQL Server Compact 4.0 安装后就可以解决.下载地址是: http://www.microsoft.com/downloads/zh-cn/details.aspx?f ...

  6. 找不到请求的 .Net Framework Data Provider

    1.安装 mysql-connector-net-6.9.10.msi 2.修改C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine ...

  7. 解决“找不到请求的 .Net Framework Data Provider。可能没有安装.”错误

    问题: 这几天在装.NET 的开发环境,在装好VS2013和Oracle 11g之后,做了一个测试项目,运行调试没问题 但是涉及到数据库相关操作,如新建数据集.连接数据库等在调试的时候则会出现如下错误 ...

  8. CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法

    今天想使用CodeSimth生成一个sqlite数据库的模板.当添加添加数据库的时候发现: .Net Framework Data Provider 可能没有安装. 下面找到官方的文档说明: SQLi ...

  9. CodeSimth - .Net Framework Data Provider 可能没有安装

    使用CodeSimth 连接SQLite数据库库 提示错误 codesmith 6以上的版本,说是支持sqlite生成,也有对应的sqliteprovider.dll,但是使用时却说Test fail ...

随机推荐

  1. Codeforces Round #345 (Div. 1) B. Image Preview

    Vasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed ...

  2. poj 2187 Beauty Contest

    Beauty Contest 题意:给你一个数据范围在2~5e4范围内的横纵坐标在-1e4~1e4的点,问你任意两点之间的距离的最大值的平方等于多少? 一道卡壳凸包的模板题,也是第一次写计算几何的题, ...

  3. MVC-Html.ActionLink的几种写法

    Html.ActionLink("linkText","actionName") Html.ActionLink("linkText",&q ...

  4. JDBC和DBUtils区别(查询时jdbc只能返回ResultSet需要po转vo,dbutils返回的BeanListHandler与BeanHandler对应集合与对象)

    17:34 2013/6/7 JDBC //添加客户 public void addNewCustomer(Customer c) throws DAOException { Connection c ...

  5. 实现strlen,strcpy,strcat,strcmp同功能的函数stringLength,stringCopy,stringCatch,stringCompare

    #import <Foundation/Foundation.h> /* 求字符串长度 */ int stringLength(char arr[]); /* 复制字符串 将arr1 复制 ...

  6. srvctl 命令

    SRVCTL命令可以控制RAC数据库中的instance,listener以及services.通常SRVCTL在ORACLE用户下执行.下面我们来介绍srvctl命令.1.通过SRVCTL命令来st ...

  7. [转载]C#.NET中Dns类的常用方法及说明

    IP是一种普遍应用于因特网.允许不同主机能够相互找到对方的寻址协议.IP地址由4个十进制的数字号码所组成,而每一个号码的值介于0~255之间,它虽然解决了网络上计算机的识别问题,但是IP地址确不容易记 ...

  8. uva 1475 - Jungle Outpost

    半平面交,二分: 注意,题目的点是顺时针给出的: #include<cstdio> #include<algorithm> #include<cmath> #def ...

  9. jar包中的类如何读取包内和包外的配置文件

    最近将代码打包成jar包,关于如何处理读取配置文件的问题特此记录一下. out.properties a.jar -com -a.class -in.properties 如上所示,out.prope ...

  10. javaweb学习总结(二十八)——JSTL标签库之核心标签

    一.JSTL标签库介绍 JSTL标签库的使用是为弥补html标签的不足,规范自定义标签的使用而诞生的.使用JSLT标签的目的就是不希望在jsp页面中出现java逻辑代码 二.JSTL标签库的分类 核心 ...