DW ASP+VBS数据库查找语句最多可以多少个条件
item_brand=Request("item_brand")item_part=Request("item_part")item_vol=Request("item_...
item_brand =Request("item_brand")
item_part =Request("item_part")
item_vol =Request("item_vol")
item_color =Request("item_color")
item_source =Request("item_source")
item_inprice =Request("item_inprice")
item_id = Request("item_id")
item_intate=formatDateTime(Date(),1)
SQL="Select * From item_kind Where item_brand='" & item_brand & "'"
SQL = SQL & " And item_part = '" & item_part & "'"
SQL = SQL & " And item_vol = '" & item_vol & "'"
SQL = SQL & " And item_color = '" & item_color & "'"
SQL = SQL & " And item_source = '" & item_source & "'"
set rs = GetSecuredAccdbRecordset( mdbFile, SQL, mdbPassword )
if not rs.eof then
item_kind = rs.fields("kind_id").value
rs("item_score")=rs.fields("item_score").value+1
rs.update
else
rs.addnew
rs("item_brand")=item_brand
rs("item_part")=item_part
rs("item_vol")=item_vol
rs("item_color")=item_color
rs("item_source")=item_source
rs("item_score")=1
rs.update
end if
我把数据库全部删掉的时候这个语句可以添加一条记录进去,但是添加第二条的时候就会出错
提示
缺少对象: 'rs'
这一行 if not rs.eof then 展开
item_part =Request("item_part")
item_vol =Request("item_vol")
item_color =Request("item_color")
item_source =Request("item_source")
item_inprice =Request("item_inprice")
item_id = Request("item_id")
item_intate=formatDateTime(Date(),1)
SQL="Select * From item_kind Where item_brand='" & item_brand & "'"
SQL = SQL & " And item_part = '" & item_part & "'"
SQL = SQL & " And item_vol = '" & item_vol & "'"
SQL = SQL & " And item_color = '" & item_color & "'"
SQL = SQL & " And item_source = '" & item_source & "'"
set rs = GetSecuredAccdbRecordset( mdbFile, SQL, mdbPassword )
if not rs.eof then
item_kind = rs.fields("kind_id").value
rs("item_score")=rs.fields("item_score").value+1
rs.update
else
rs.addnew
rs("item_brand")=item_brand
rs("item_part")=item_part
rs("item_vol")=item_vol
rs("item_color")=item_color
rs("item_source")=item_source
rs("item_score")=1
rs.update
end if
我把数据库全部删掉的时候这个语句可以添加一条记录进去,但是添加第二条的时候就会出错
提示
缺少对象: 'rs'
这一行 if not rs.eof then 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询