⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcconn.asp

📁 作业提交评分管理系统
💻 ASP
字号:
<%
Dim conn, connstr, db, starTime, endTime, costTime
starTime = timer()
db = "manage/db/kaoshi.mdb"
Set conn = Server.CreateObject("ADODB.Connection")

connstr="Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Server.MapPath(db)




conn.Open (connstr)

If IsObject(conn) Then
    If conn.Errors.Count > 0 Then
        For iErrorCount = 0 To conn.Errors.Count - 1
            If conn.Errors(iErrorCount).Number > 0 Then
                Response.Write ("错误编号 (Error No): "& conn.Errors(iErrorCount).Number &"<br>")
                Response.Write ("错误信息 (Description): "& conn.Errors(iErrorCount).Description  &"<br>")
                Response.Write ("出错文件 (Source): "& conn.Errors(iErrorCount).Source  &"<br>")
                Response.Write ("SQL 状态 (SQLState): "& conn.Errors(iErrorCount).SQLState  &"<br>")
                Response.Write ("本地错误 (NativeError): "& conn.Errors(iErrorCount).NativeError  &"<br>")
            End If
        Next
        Response.End()
    End If
End If

Function connClose()
    If conn.State = 1 Then conn.Close()
    If IsObject(conn) Then Set conn = Nothing

    endTime = timer()
    costTime = formatNumber((endTime - startTime) / 1000, 2)
    Response.Write ("共用" & costTime & "毫秒")
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -