中华考试网·阅读新闻
编程开发 > ASP > 文章内容

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

ASP编程教程技巧综合大全(2)
咨询热线:4000-525-585(免长途费)