Home > Database > Mysql Tutorial > sqlserver,sqlite,access数据库链接字符串

sqlserver,sqlite,access数据库链接字符串

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:34:54
Original
1276 people have browsed it

SqlServer:string connection = "server=32.1.1.48;database= 数据库 名;user=sa;password=sa2008"; access 2007: //无密码的连接 字符串 stringconStr ="Provider=Microsoft.Ace.OleDb.12.0;Data Source=E://111.accdb;Persist Security Info=False"; //有

SqlServer:string connection = "server=32.1.1.48;database=数据库名;user=sa;password=sa2008";

access 2007:

    //无密码的连接字符串

            string conStr = "Provider=Microsoft.Ace.OleDb.12.0;Data Source=E://111.accdb;Persist Security Info=False";

     //有密码的连接字符串

            string conStr = "Provider=Microsoft.Ace.OleDb.12.0;Data Source=E://111.accdb;Jet OleDb:DataBase Password=111";

access 2003

          //无密码的连接字符串

            string conStr = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=E://111.mdb;Persist Security Info=False";

     //有密码的连接字符串

            string conStr = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=E://111.mdb;Jet OleDb:DataBase Password=111";

    链接access数据库若出现 无法启动应用程序 工作组信息文件丢失 有可能是链接字符串链接不正确

 

Sqlite :

    string conStr = "Data Source=E://111.db;Password=111";

    在使用SQLite时需要添加一个引用 System.Data.SQLite,C#在运行时候会提示混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集 ,这个问题可以在app.config中添加一个配置节:startup

<startup uselegacyv2runtimeactivationpolicy="<span">"<span>true</span><span>"</span>>
    <supportedruntime version="<span">"<span>v4.0</span><span>"</span>/>
  </supportedruntime></startup>
Copy after login

 

 

 

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Problem with tp6 connecting to sqlserver database
From 1970-01-01 08:00:00
0
0
0
Unable to connect to SQL Server in Laravel
From 1970-01-01 08:00:00
0
0
0
Methods of parsing MYD, MYI, and FRM files
From 1970-01-01 08:00:00
0
0
0
SQLSTATE: User login failed
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template