ASP数据库执行语句:类型不匹配
新人学ASP.遇难了.遇难了..唉...我鳖了一天.没弄明白它.大家帮我看看吧.是啥地方有错.我想实现cat_id传过来的[yingwen]写入到数据库Gq_articl...
新人学ASP.遇难了.遇难了..
唉...我鳖了一天.没弄明白它.
大家帮我看看吧.是啥地方有错.
我想实现cat_id传过来的[yingwen]写入到数据库Gq_article的cat_id中
但出现错误.
Microsoft VBScript 运行时错误 '800a000d'
类型不匹配: '[string: "yingwen"]'
代码如下-----------------------------------
sql="select * from Gq_article where id="&cint(request.Form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
catid=request.form("cat_id")
title=trim(replace(request.form("art_title"),"'",""))
artisbest=request.form("isbest")
content=rtrim(replace(request.form("content"),"",""))
content=trim(replace(content," "," "))
if catid<1 then
founderr=true
Response.Write("<script language=javascript>alert('你必须选择文章的分类!');history.back(1);</script>")
else
rs("cat_id")=catid
end if
----------------------------------------------------------
<td class="TableRow1"><select name="cat_id">
<option value="zifu"><%=rs("cat_name")%></option> 展开
唉...我鳖了一天.没弄明白它.
大家帮我看看吧.是啥地方有错.
我想实现cat_id传过来的[yingwen]写入到数据库Gq_article的cat_id中
但出现错误.
Microsoft VBScript 运行时错误 '800a000d'
类型不匹配: '[string: "yingwen"]'
代码如下-----------------------------------
sql="select * from Gq_article where id="&cint(request.Form("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
catid=request.form("cat_id")
title=trim(replace(request.form("art_title"),"'",""))
artisbest=request.form("isbest")
content=rtrim(replace(request.form("content"),"",""))
content=trim(replace(content," "," "))
if catid<1 then
founderr=true
Response.Write("<script language=javascript>alert('你必须选择文章的分类!');history.back(1);</script>")
else
rs("cat_id")=catid
end if
----------------------------------------------------------
<td class="TableRow1"><select name="cat_id">
<option value="zifu"><%=rs("cat_name")%></option> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询