怎么会将 varchar 值 转换成数据类型 int 时失败啊?
怎么老提醒“将varchar值转换成数据型int时失败”啊。tks~
提示错误如下:
[qutoe]Microsoft SQL Native Client 错误 '80040e07'
在将 varchar 值 'grid' 转换成数据类型 int 时失败。
/labgo/bbs/FourmName.asp,行 30 (红色那段)[/quote]
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
dim rs,strsql20,rs2,strsql2,grid
set rs=Server.CreateObject("ADODB.RecordSet")
strSql = "Select * From [Groups] Order by GroupID "
rs.open strSql,conn,3,3
do while not(rs.eof or err)
grid = cint(rs("GroupID"))
response.Write("<li><strong><a href=de.asp?GroupID="&rs("GroupID")&">"&rs("GroupName")&"</a></strong></li>")
strsql2= "Select * From [Forums] Where GroupID='grid'"
Set rs2=Conn2.Execute(strSql2)
do while not (rs2.eof or err)
response.Write("<br> <a href=ShowForum.asp?ForumID="&rs2("ForumID")&">"&rs2("ForumName")&"</a>")
rs2.movenext
loop
rs.movenext
loop
%>
</table>