<!--#include file="Cache/QvodCms.Config.asp"-->
<!--#include file="Cache/QvodCms.WinPy.asp"-->
<!--#include file="Include/QvodCms.Error.asp"-->
<%
Dim Conn,SystemDatabaseType,DBFileName,SqlDatabaseName,SqlUsername,SqlPassword,SqlHostIP
Dim sql,rs
SystemDatabaseType = Config(1)
DBFileName = Config(2)
SqlDatabaseName = Config(3)
SqlUsername = Config(4)
SqlPassword = Config(5)
SqlHostIP = Config(6)
Sub OpenConn()
    On Error Resume Next
    Dim ConnStr
    If SystemDatabaseType = "SQL" Then
        ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlHostIP & ";"
    Else
        ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DBFileName)
    End If
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.open ConnStr:QvodCmsError()
End Sub
Sub CloseConn()
    On Error Resume Next
    If IsObject(Conn) Then
        Conn.Close
        Set Conn = Nothing
    End If
End Sub

Sub QvodCmsError()
    If Err Then Response.write errHtml(err.NumBer,err.description):Err.Clear:Set Conn = Nothing:Response.End()
End Sub
%>