打开dbf数据库的问题!!

ddydy 2003-01-23 12:51:55
/test/db/ 目录下放了一个dbf文件 1.dbf

数据库链接函数如下:
Function CreateDbfRecordset()

dim Driver,SourceType,DBPath
Set dbfconn = Server.CreateObject("ADODB.Connection")
Driver = "Driver={Microsoft Visual FoxPro Driver};"
SourceType = "SourceType=DBF;"
DBPath = "SourceDB=" & Server.MapPath( "/test/db/" )
dbfconn.Open Driver & SourceType & DBPath

End Function

调用:
CreateDbfRecordset()
set rs=server.CreateObject("adodb.recordset")
rs.Open dbfconn,"select * from 1.dbf"

出错提示:
ADODB.Recordset 错误 '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/test/index.asp,行6
...全文
40 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
par 2003-01-23
  • 打赏
  • 举报
回复
设成真正数据库.dbc可能好点
ddydy 2003-01-23
  • 打赏
  • 举报
回复
设成dbc后:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

[Microsoft][ODBC Visual FoxPro Driver]File d:\nyrc\test\db\1.dbf is not a database.

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧