'**************************************************
'[测试数据库是否存在]
'函数名:TestDBOK
'作 用:测试数据库是否存在
'参 数:TestConnStr ---- 数据库链接字串
'返回值:测试成功返回 True 否则 False
'示 例:TestDBOK("testConnString")
'**************************************************
Public Function TestDBOK(ByVal TestConnStr)
TestDBOK=False
DIM fu_Conn
Set fu_Conn=server.createobject("ADODB.Connection")
On Error GoTo 0
On Error Resume Next
fu_Conn.open TestConnStr
If Err.Number = 0 Then
TestDBOK=True
End If
On Error GoTo 0
Set fu_Conn = Nothing
End Function

