[求助]ODBC 驱动程序不支持所需的属性
能正常加入到数据库,但加完就会出现错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/atf/admin/m_s_dis.asp, 第 9 行
<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="ubb.asp"-->
<%
' ********* 增加 **************
dis = request.querystring("dis")
set rs2 = server.createobject("adodb.recordset")
sql2 = "select * from pro_dis1 where id="&dis&""
rs2.open sql2,conn,1,1 第九行
if not(rs2.eof or rs2.bof) then
bn=rs2("names")
end if
rs2.close
set rs2 = nothing
if request.form("submit") = "增加" then
names = check_str(trim(request.form("names")))
if names = "" then
response.write "<script>alert(""对不起,请填写类别名称!"");history.go(-1);</script>"
response.end
end if
sql = "insert into pro_dis2(names,bname,bid) values ('"& names &"','"& bn &"','"& dis &"')"
conn.execute sql
conn.close
set conn = nothing
mess "类别添加成功","恭喜您,产品类别添加成功,请等待……","m_s_dis.asp"
response.end
end if
' ********* 删除 ********
if request.form("submit") = "删除" then
id = request.querystring("id")
sql = "delete * from pro_dis2 where id=" & id
conn.execute sql
sql_2 = "delete * from product1 where cid=" & id
conn.execute sql_2
conn.close
set conn = nothing
mess "类别删除成功","恭喜您,产品类别删除成功,请等待……","m_s_dis.asp"
response.end
end if
' ******** 修改 *************
if request.form("submit") = "修改" then
names = check_str(trim(request.form("names")))
id = request.querystring("id")
sql = "update pro_dis2 set names='"& names &"' where id=" & id
conn.execute sql
conn.close
set conn = nothing
mess "修改成功","恭喜您,产品类别修改成功,请等待……","m_s_dis.asp"
response.end
end if
%>