用asp怎样连接foxpro数据库?
因为最近开发的一个管理系统用的是foxpro数据库,找了一些连接的代码,现在是用绝下面对路的那段来连接,因为上面的本人不知如何用之?
'下面的代码这样使用有什么问题吗?直接拷进去连接不上
Function GetDbcConnection( test.dbc)
Dim Driver, SourceType, DBPath
Driver = "Driver={Microsoft Visual FoxPro Driver};"
SourceType = "SourceType=DBC;"
DBPath = "SourceDB=" & Server.MapPath( test.dbc)
Set GetDbcConnection = GetConnection( Driver & SourceType & DBPath )
End Function
下面这段可以正常使用了,但它只认绝对路径,可恶!
dim connstr
Set Conn = Server.CreateObject("ADODB.connection")
ConnStr= "Driver=Microsoft Visual Foxpro Driver; UID=userID;SourceType=DBC;SourceDB=f:\wwwroot\fox+asp\test.dbc"
Conn.Open ConnStr
谁能帮我指点迷经?