绿豆.Net

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

带密码Accsce数据库访问

Adodc3.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=" & txt_filename.Text & ";Jet OLEDB:database password=" & txt_password.Text
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select * from DRV_KM2ZKKSJL where kscj<>2 order by LSH"

Set DataGrid2.DataSource = Adodc3


以上是连接字符串,不过当没有Set DataGrid2.DataSource = Adodc3时,表格是不会装载数据的,除非在设计壮态数据源存在。

posted on 2007-11-17 17:41  杜军  阅读(217)  评论(0)    收藏  举报