% ' Generic ASP Editor for Access Tables ' Version 1.01 - 9 November 1999 ' ?Roman Koch ' ===================================================================== ' Your customisations go here ' ===============================================
' generic asp editor for access tables
' version 1.01 - 9 november 1999
' ?roman koch
' =====================================================================
' your customisations go here
' =====================================================================
' enter the name of the system dsn
session("mydsn") = "mp3"
' enter the name of the table you want to edit
' note: for text fields, the "allow zero length" attribute must be set to yes
session("mytable") = "customer"
' enter the name of the primary key field
' note: the primary key must be a "autonumber"-type field
session("mykey") = "customerid"
' =====================================================================
' end of the customisation section
' =====================================================================
dim objconn
if isobject(session("dsndefined")) then
set objconn = session("dsndefined")
else
set objconn = server.createobject("adodb.connection")
objconn.open session("mydsn")
set session("dsndefined") = objconn
end if
strmyownpath = request.servervariables("path_info")
intstart = instrrev(strmyownpath,"/",-1,1)
strmyname = mid(strmyownpath,intstart+1)
session("myname") = strmyname
straction = request.querystring("action")
lngrecord = request.querystring("num")
select case straction
case "list" 'list all records
call editlist()
case "update" 'get the current record and display in a form for editing
call editupdate(lngrecord)
case "updateexec" 'save the changes
call editupdateexec(lngrecord)
case "insert" 'display an empty form for entering a new record
call editinsert()
case "insertexec" 'save the new record
call editinsertexec()
case "delete" 'display the current record so deletion can be confirmed
call editdelete(lngrecord)
case "deleteexec" 'delete the record
call editdeleteexec(lngrecord)
case else 'same as list parameter
call editlist()
end select
%>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号