asp录入记录问题

来源:百度知道 编辑:UC知道 时间:2024/05/10 07:52:34
我在access中建立了score表有tybh(文本格式,主键),class(文本),语文成绩(数字格式)。我现在利用模糊查询,查到tybh和语文成绩,请问如何把查到的语文记录进行批量修改。我用表单更新记录老说没有唯一键,可我已经选择了tybh主键,请高手指教!!查询结果代码如下,
<%
Dim Recordset1
Dim Recordset1_numRows
dim strtybh
dim strclass
dim Recordset1__MMColParam
strtybh= Request("tybh")
strclass=Request("class")
if request("tybh")="" and request("class")="" then
response.write("请输入查询条件(可模糊查询)")
response.end
end if
Set Recordset1 = Server.CreateObject ("ADODB.Recordset")
Recordset1.ActiveConnection= MM_myconn_STRING
if strtybh <> "" then
Recordset1__MMColParam =strtybh
Recordset1.Source = "SELECT * FROM score Where tybh LIKE '" & Recordset1__MMColParam & "%' ORDER BY tybh"
elseif(strclass <> "")then
Recordset1__MMColParam =strclass
Recordset1.Source

Recordset1__MMColParam =strtybh
Recordset1.Source = "SELECT * FROM score Where tybh LIKE '" & Recordset1__MMColParam & "%' ORDER BY tybh"
elseif(strclass <> "")then
Recordset1__MMColParam =strclass
Recordset1.Source = "SELECT * FROM score Where class LIKE '" & Recordset1__MMColParam & "%' ORDER BY tybh" 建立了score表有tybh(文本格式,主键),class(文本),语文成绩(数字格式)。利用模糊查询,查到tybh和语文成绩,