Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1302979
  • 博文数量: 482
  • 博客积分: 13297
  • 博客等级: 上将
  • 技术积分: 2890
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-12 16:25
文章分类

全部博文(482)

文章存档

2012年(9)

2011年(407)

2010年(66)

分类: WINDOWS

2011-11-26 11:38:35

strPath = "C:\\Documents and Settings\\Administrator\\My Documents\\Database1.accdb";

            String strCon = "Provider=Microsoft.ACE.OLEDB.12.0;jet oledb:database password=123;Data Source=";
            strCon += strPath;
            OleDbConnection myCon = new OleDbConnection(strCon);

            try
            {
                myCon.Open();
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }

            string strState = myCon.State.ToString();

====
阅读(985) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~