首页  编辑  

连接有密码的Access数据库

Tags: /C#/数据库和SQL语句/   Date Created:

using System . Data . OleDb;

OleDbConnection vOleDbConnection = new OleDbConnection ();

vOleDbConnection . ConnectionString =

    @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

    @"C:\temp\temp.mdb;User ID=admin;Password=;" +

    @"Jet OLEDB:Database Password=111111" ;

vOleDbConnection . Open();