日期:2014-05-16  浏览次数:21113 次

远程连接MS Access数据库
环境:

XPSP2 + IIS + .Net 3.5 + VS2008



代码:

  Dim connectionString As String = _
  "Provider=MS Remote;" & _
  "Remote Server=http://127.0.0.1;" & _
  "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
  "Data Source=F:\tmp\1.mdb;Persist Security Info=False"

  Me.dataAdapter = New OleDbDataAdapter("select * from t1", connectionString)

  Me.dataAdapter.Fill(ds, "my_table") <- Exception



错误信息:

System.Data.OleDb.OleDbException was unhandled
  ErrorCode=-2146819841
  Message="Internet 服务器错误。"
  Source="Microsoft ADO/RDS"



------解决方案--------------------
access 是通过文件访问来实现的,你这种方法不行。只能在远程共享文件目录来实现。