.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. jquery 验证插件 validate

    1)required:true 必输字段(2)remote:"check.php" 使用ajax方法调用check.php验证输入值(3)email:true 必须输入正确格式的电 ...

  2. Java学习-Overload和Override的区别

    1.Overload是重载的意思,Override是覆盖的意思,也就是重写. 2.重载Overload表示同一个类中可以有多个名称相同的方法,但这些方法的参数列表各不相同(即参数个数或类型不同). 3 ...

  3. UI表单

    Monk.UI表单美化插件诞生记!   阅读目录 背景 预览效果 表单组件 普通文本框 多行文本框 复选框 切换滑块 单选框 下拉选择框 数字输入框 时间选择 文件选择 显示文本 按钮 开源地址 背景 ...

  4. How To Call Stored Procedure In Hibernate

    How To Call Stored Procedure In Hibernate In this tutorial, you will learn how to call a store proce ...

  5. 中国海洋大学第四届朗讯杯高级组 I Cuckoo for Hashing

    http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2719&cid=1203 题意 :意思就是哈希来的,具体大意就是说有两个哈希表,然后有这样 ...

  6. SPRING IN ACTION 第4版笔记-第四章ASPECT-ORIENTED SPRING-004-使用AspectJ’s pointcut expression language定义Pointcut

    一. 1.在Spring中,pointcut是通过AspectJ’s pointcut expression language来定义的,但spring只支持它的一部分,如果超出范围就会报Illegal ...

  7. MFC浅析(7) CWnd类虚函数的调用时机、缺省实现

    CWnd类虚函数的调用时机.缺省实现 FMD(http://www.fmdstudio.net) 1. Create 2. PreCreateWindow 3. PreSubclassWindow 4 ...

  8. OpenSSL 与 SSL 数字证书概念贴

    SSL/TLS 介绍见文章 SSL/TLS原理详解(http://seanlook.com/2015/01/07/tls-ssl). 如果你想快速自建CA然后签发数字证书,请移步 基于OpenSSL自 ...

  9. spring声明式事务 同一类内方法调用事务失效

    只要避开Spring目前的AOP实现上的限制,要么都声明要事务,要么分开成两个类,要么直接在方法里使用编程式事务 [问题] Spring的声明式事务,我想就不用多介绍了吧,一句话“自从用了Spring ...

  10. Shell编程学习---第五篇:Shell的输入和输出

    在shell脚本中,可以用几种不同的方式读入数据:可以使用标准输入—缺省为键盘,或 者指定一个文件作为输入.对于输出也是一样:如果不指定某个文件作为输出,标准输出总 是和终端屏幕相关联.如果所使用命令 ...