📄 test1.asp
字号:
<% 'Option Explicit %>
<!-- #include file="config.inc" -->
<!-- #include file="db.inc" -->
<!-- #include file="recordlist.inc" -->
<html>
<head>
<style type="text/css">
<!-- @import url(../common/common.css); -->
</style>
</head>
<body>
<%
response.write "开始连接数据库...<br>"
dim oCn : Set oCn = New CDBConnection
oCn.connect(dbLocal)
response.write "已经连上数据库。<br>"
'dim oCn : set oCn = New CDBConnection()
'oCn.Connect(dbLocal)
'response.write "已经连上数据库。<br>"
'=================================================
' 测试CDBConnection连接和断开数据库,以及CRecordset
'-------------------------------------------------
'Dim sSQL : sSQL = "select title_id as '职称标识', title_desc as '职称名称' from T_Title order by title_id"
'call ShowTable(sSQL)
'=================================================
' 测试DLookUp函数
'-------------------------------------------------
dim a : a = DLookUp(dbLocal, "T_Title", "title_desp", "title_id = 1")
Response.write "** " & a & " **<br>"
oCn.Disconnect()
'=================================================
' 测试SelectOptions函数
'-------------------------------------------------
'Response.Write( _
' "<select>" & VBLF & _
' SelectOptions(dbLocal, "T_Title", "title_id", "title_desc", "4", "") & _
' "</select>")
'=================================================
' 测试ExecuteSQL函数
'-------------------------------------------------
'call ExecuteSQL(dbLocal, "delete from T_Title where title_id = 13")
'=================================================
' 测试TotalRecords函数
'-------------------------------------------------
'Response.Write( _
' "共 " & _
' TotalRecords(dbLocal, "select title_id, title_desc from T_Title order by title_id") & _
' " 条记录!")
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -