通常我使用 SQL Server 作为我的项目的数据库,但我的一个项目处理使用 .dbf 格式作为数据库的 ESRI shapefile(我认为它是 DBASE III 或 IV 格式)。
我想创建一些 Web 界面来修改 dbf 上已经存在的值,例如,如果街道名称不正确或多个地方的地址,客户可以编辑它。
过去我已经运行了 Classic ASP 3.0 应用程序,我想集成新功能。
我的问题:
1. 什么是与 DBF 交互的连接字符串(DSN-less 更可取)?
2. 谁能给我一些检索/更新记录的例子?
我已经读过这个:
http ://www.intermedia.net/support/kb/default.asp?id=761和
http://www.motobit.com/tips/detpg_asp-dbf-database/
没有工作,目前我的代码是这样的(不工作):
Set connDBF1 = Server.CreateObject("ADODB.Connection")
connDBF1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\digimap;Extended Properties=""DBASE IV;"";"
connDBF1.Open
Set connDBF2 = Server.CreateObject("ADODB.Connection")
connDBF2.ConnectionString = "DBQ=D:\digimap;DefaultDir=D:\digimap;Driver={Microsoft dBase Driver (*.dbf)};ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;Threads=3;UserCommitSync=Yes;"
connDBF2.Open
set rs = connDBF1.Execute("SELECT * FROM taspat_ka_jawa")
set rs = connDBF2.Execute("SELECT * FROM taspat_ka_jawa")
错误是
Microsoft JET Database Engine error '80040e37'
The Microsoft Jet database engine could not find the object 'taspat_ka_jawa'. Make sure the object exists and that you spell its name and the path name correctly.
test_dbf.asp, line 11
我很确定“taspat_ka_jawa”已经在“D:\digimap”中
解决
了我对 OleDB Provider 使用 Advantage ADO,它工作正常,我现在可以查看/编辑/删除记录
http://www.sybase.com/products/databasemanagement/advantagedatabaseserver/ole-db-provider
谢谢,德尔斯