DBF / FoxPro
ODBC
standard:
"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\mydbpath;"
OLE DB, OleDbConnection (.NET)
standard:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password="
Visual FoxPro
OLE DB, OleDbConnection (.NET)
Database container (.DBC):
"Provider=vfpoledb.1;Data Source=C:\MyDbFolder\MyDbContainer.dbc;Password=MyPassWord;Collating Sequence=machine"
Free TABLE directory:
"Provider=vfpoledb.1;Data Source=C:\MyDataDirectory\;Password=MyPassWord;Collating Sequence=general"
Read more (Microsoft msdn) >>
ODBC
Database container (.DBC):
"Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\myvfpdb.dbc;Exclusive=No;Collate=Machine;"
Free TABLE directory:
"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;Exclusive=No;Collate=Machine;"
"Collate=Machine" is the default setting, for other settings check the list of supported collating sequences >>
Microsoft Visual Foxpro site: http://msdn.microsoft.com/vfoxpro
zys59dim conn,strConn
set conn = server.createObject("ADODB.connection")
conn.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\twotab;Extended Properties=dBASE IV;User ID=Admin;Password="
conn.open
我用这段话把Connection对象建立起来了,没有提示错误。
然后我写了如下的话:
dim rs,strSQL
set rs = server.createObject("ADODB.recordSet")
strSQL = "select * from abcd"
rs.open strSQL,conn,1,3,1
abcd是我的vfp_test.dbc下的一个表,存为abcd.dbf,系统提示如下:
Microsoft JET Database Engine 错误 '80004005'
外部表不是预期的格式。
/twoTAB/linkVFP.asp,行 10
请问这是怎么回事?
zys59大家帮忙啊,分不够可以在加,我菜,我着急,谢谢了,帮忙顶也给分了
ybfqlyq試下這個連接。
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={microsoft Visual Foxpro driver};sourcetype=DBC;sourceDB=*.dbc;Exclusive=No;"
------------------
http://www.ybfq.net/article/show.asp?id=2011
liuxiaoyi666www.connectionstrings.com
zys59<%
dim conn,strConn
set conn = server.createObject("ADODB.connection")
conn.connectionString = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB="&server.mapPath("database/vfp_test.dbc")&";Exclusive=No;"
conn.open
dim rs,strSQL
set rs = server.createObject("ADODB.recordSet")
strSQL = "select * from abcd"
rs.open strSQL,conn,1,3,1
%>
我的数据库结构和上贴相同,语句如上,实现了对VFP数据库的操作。
在这之前我安装了VFPODBC5.0和MDAC2.7,不知道是哪个管用了。有类似情况的可以试一下。
zys59abcd是我的vfp_test.dbc下的一个表,存为abcd.dbf
zys59谢谢大家帮助,虽然还没弄明白到底是什么起了作用,但好歹实现了对VFP的控制,高兴!再次对大家表示感谢。
ODBC
standard:
"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\mydbpath;"
OLE DB, OleDbConnection (.NET)
standard:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password="
Visual FoxPro
OLE DB, OleDbConnection (.NET)
Database container (.DBC):
"Provider=vfpoledb.1;Data Source=C:\MyDbFolder\MyDbContainer.dbc;Password=MyPassWord;Collating Sequence=machine"
Free TABLE directory:
"Provider=vfpoledb.1;Data Source=C:\MyDataDirectory\;Password=MyPassWord;Collating Sequence=general"
Read more (Microsoft msdn) >>
ODBC
Database container (.DBC):
"Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\myvfpdb.dbc;Exclusive=No;Collate=Machine;"
Free TABLE directory:
"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;Exclusive=No;Collate=Machine;"
"Collate=Machine" is the default setting, for other settings check the list of supported collating sequences >>
Microsoft Visual Foxpro site: http://msdn.microsoft.com/vfoxpro
zys59dim conn,strConn
set conn = server.createObject("ADODB.connection")
conn.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\twotab;Extended Properties=dBASE IV;User ID=Admin;Password="
conn.open
我用这段话把Connection对象建立起来了,没有提示错误。
然后我写了如下的话:
dim rs,strSQL
set rs = server.createObject("ADODB.recordSet")
strSQL = "select * from abcd"
rs.open strSQL,conn,1,3,1
abcd是我的vfp_test.dbc下的一个表,存为abcd.dbf,系统提示如下:
Microsoft JET Database Engine 错误 '80004005'
外部表不是预期的格式。
/twoTAB/linkVFP.asp,行 10
请问这是怎么回事?
zys59大家帮忙啊,分不够可以在加,我菜,我着急,谢谢了,帮忙顶也给分了
ybfqlyq試下這個連接。
set adocon=Server.Createobject("adodb.connection")
adocon.open"Driver={microsoft Visual Foxpro driver};sourcetype=DBC;sourceDB=*.dbc;Exclusive=No;"
------------------
http://www.ybfq.net/article/show.asp?id=2011
liuxiaoyi666www.connectionstrings.com
zys59<%
dim conn,strConn
set conn = server.createObject("ADODB.connection")
conn.connectionString = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB="&server.mapPath("database/vfp_test.dbc")&";Exclusive=No;"
conn.open
dim rs,strSQL
set rs = server.createObject("ADODB.recordSet")
strSQL = "select * from abcd"
rs.open strSQL,conn,1,3,1
%>
我的数据库结构和上贴相同,语句如上,实现了对VFP数据库的操作。
在这之前我安装了VFPODBC5.0和MDAC2.7,不知道是哪个管用了。有类似情况的可以试一下。
zys59abcd是我的vfp_test.dbc下的一个表,存为abcd.dbf
zys59谢谢大家帮助,虽然还没弄明白到底是什么起了作用,但好歹实现了对VFP的控制,高兴!再次对大家表示感谢。