📄 addcheck.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/conn.asp" -->
<%
if(Request.Form("textID") <> "") then Command1__rfID = Request.Form("textID")
if(Request.Form("textName") <> "") then Command1__rfName = Request.Form("textName")
if(Request.Form("textPhone") <> "") then Command1__rfPhone = Request.Form("textPhone")
if(Request.Form("textAddress") <> "") then Command1__rfAddress = Request.Form("textAddress")
if(Request.Form("textMail") <> "") then Command1__rfMail = Request.Form("textMail")
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_conn_STRING
Command1.CommandText = "INSERT INTO Customers (CustomerID,CustomerName,Phone,Address,E-MAIL) VALUES (" + Replace(Command1__rfID, "'", "''") + ",'" + Replace(Command1__rfName, "'", "''") + "','" + Replace(Command1__rfPhone, "'", "''") + "','" + Replace(Command1__rfAddress, "'", "''") + "','" + Replace(Command1__rfMail, "'", "''") + "') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Command指令对象插入数据成功</title>
</head>
<body>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><div align="center"><strong>成功新增以下客户记录</strong></div></td>
</tr>
<tr>
<td width="100">客户编号</td>
<td width="300"><%= Request.Form("textID") %></td>
</tr>
<tr>
<td>客户名称</td>
<td><%= Request.Form("textName") %></td>
</tr>
<tr>
<td>电话</td>
<td><%= Request.Form("textPhone") %></td>
</tr>
<tr>
<td>地址</td>
<td><%= Request.Form("textAddress") %></td>
</tr>
<tr>
<td>电子邮件</td>
<td><%= Request.Form("textMail") %></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -