帮我改写一下ASP啊,

来源:百度知道 编辑:UC知道 时间:2024/04/30 10:53:20
我只是想把他改成,将ASP表单里的内容写入SQL2000里面,下面是页面代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/xiaoshouxitong.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_xiaoshouxitong_STRING
Recordset1.Source = "SELECT * FROM dbo.xiaoshouxitong ORDER BY 编号 ASC"
Recordset1.CursorType = 2
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()

Recordset1_numRows = 0
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="ht

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/xiaoshouxitong.asp" -->
<%
if request("Submit")="提交" then

set conn=Server.CreateObject("adodb.Connection")
conn.Open("driver={SQL Server};Server=127.0.0.1;database=数据库;uid=用户名;pwd=密码;")
set rs=Server.CreateObject("adodb.Recordset")
if request("id")="" then
rs.open "dbo.xiaoshouxitong",conn,1,3
rs.addnew
else
rs.open "select * from dbo.xiaoshouxitong where 编号="&request("id"),conn,1,3
end if
rs("销售数量")=request("textfield")
rs.update()
rs.close
conn.close
response.Write("提交成功")
response.End()
end if

Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset"