ASP编程教程技巧综合大全(3)
2015-7-6编辑:ljnbset
Public function DbExists(byVal dbPath)
''查找数据库文件是否存在
On Error resume Next
Dim c
Set c = Server.CreateObject("ADODB.Connection")
c.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath
If Err.number<>0 Then
Err.Clear
DbExists = false
else
DbExists = True
End If
set c = nothing
End function
Public function AppPath()
''取当前真实路径
AppPath = Server.MapPath("./")
End function