看看这是什么问题?从没遇到过

possible_Y 2003-03-30 09:09:15
各位看看下面是什么问题?
我用的是xmlhttp来post的
///////////////////////////////////////////////////////////

技术信息(适用于支持人员)

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
/project/admin_addpro.asp, 第 12 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; COM+ 1.0.2204)

页:
POST 32 bytes to /project/admin_addpro.asp

POST 数据:

Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: 'Server.HTMLEncode'

/iisHelp/common/500-100.asp,行186
...全文
53 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
cmsoft 2003-03-31
  • 打赏
  • 举报
回复
同意julyclyde,也就是你post之前已经是undefined了
possible_Y 2003-03-31
  • 打赏
  • 举报
回复
为什么会这样呢?
如果把
divDisplay.innerHTML=bytes2BSTR(xmlhttp.responseBody);
改为
alert(bytes2BSTR(xmlhttp.responseBody));
就一切ok。
难道innerHTML对页面有什么影响?
possible_Y 2003-03-30
  • 打赏
  • 举报
回复
看看吧,服务器好了
julyclyde 2003-03-30
  • 打赏
  • 举报
回复
那就是说在post之前已经是undefined了
肄若芸 2003-03-30
  • 打赏
  • 举报
回复
考研一族,忙啊……
possible_Y 2003-03-30
  • 打赏
  • 举报
回复
服务器出问题了,真不是时候
possible_Y 2003-03-30
  • 打赏
  • 举报
回复
<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
set req= Server.CreateObject("Microsoft.XMLDOM")
req.async=false
req.load(Request)
if req.documentElement.nodeName="timesheet" then
'第二次post过来req.documentElement.text变为undefine
sql="select * from "&req.documentElement.text
'Response.Write sql
'Response.End
set rs=conn.Execute(sql)
mystr="<table align=center border=1 cellspacing=1 style='border-collapse: collapse' cellpadding='0' bgcolor='#ffffff' bordercolor='#C0C0C0' width='100%'>"
for i=2 to rs.Fields.Count-1
mystr=mystr&"<tr><td width=30% bgcolor='#EFEFEF' align=center>"& rs(i).Name &"</td><td width='70%' align=left><input type='text' name='txt' size=50></td></tr>"
Next
mystr=mystr&"</table>"
Response.write(mystr)
end if
else
%>
<script language="JavaScript">
function sendData(){
if(document.all("txt").value!="0")
{
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.Open("POST", "admin_addpro.asp", false);
xmlhttp.Send("<timesheet>"+document.all("txt").value+"</timesheet>");
divDisplay.innerHTML=bytes2BSTR(xmlhttp.responseBody);
//alert(bytes2BSTR(xmlhttp.responseBody)); //如果用alert就没问题
}
else
{
alert("请先选择产品类型!");
}
}
</script>
<script language="VBScript">
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
strReturn = ""

For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
</script>
选择要添加到的产品类型:<select onchange="sendData();" id="txt">
<option value="0">请选择
<%
sql="select biao_name,product_kind from kind"
set rs=conn.execute(sql)
Do while not rs.EOF
Response.Write "<option value='"&rs("biao_name")&"'>"&rs("product_kind")
rs.MoveNext
Loop
set rs=nothing
%>
</select><br>
<span id="divDisplay"></span>
<%
end if
%>
cmsoft 2003-03-30
  • 打赏
  • 举报
回复
打不开:(
possible_Y 2003-03-30
  • 打赏
  • 举报
回复
关键是为什么post过去的变量会变成了undefine?我用的是xmlhttp

www.ceocio.net/shanghai/admin.asp

user:possible
pass:1

进去后点 产品管理---》增加新的产品,然后选下拉框,第一次选没问题,第二次就出现上面错误
possible_Y 2003-03-30
  • 打赏
  • 举报
回复
问题不在12行,是因为post过去的变量变成了undefine,所以导致数据库出问题的
cmsoft 2003-03-30
  • 打赏
  • 举报
回复
12行附近的代码帖出来呀:)
possible_Y 2003-03-30
  • 打赏
  • 举报
回复
来看看哈!

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧