📄 aspsql7.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台处理页面</title>
</head>
<%
set myconn=server.createobject("adodb.connection")
myconn.open "driver={sql server};server=localhost; uid=aspnetname;pwd=123456;database=project "
set mycomm=server.CreateObject("adodb.command")
set mycomm.activeconnection=myconn
mycomm.commandtext="insert into 项目(项目号,预算,开工日期) values (?,?,?)" //插入语句
mycomm.commandtype=1
mycomm.parameters.append mycomm.createparameter("项目号",200,,25)
mycomm.parameters.append mycomm.createparameter("预算",200,,25)
mycomm.parameters.append mycomm.createparameter("开工日期",200,,25)
mycomm("项目号")=request("projectnum")
mycomm("预算")=request("yusuan")
mycomm("开工日期")=request("worktime")
mycomm.execute
set mycomm=nothing
myconn.close
set myconn=nothing
response.write "利用command对象成功插入!"
%>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -