想请教一下里面的语句出了什么毛病????

99percent 2002-05-22 01:31:34
===============================================
<%
set cnndb=server.createobjec("ADODB.connection") constr="Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & _Server.MapPath("bookdb.mdb")
cnndb.open constr
if request.from("select").value= 1 then
'select是选择下拉菜单名,1是我先设定的值是招聘单位
Set rstObj = Server.CreateObject ("ADODB.Recordset")
abc=" select * form company1 where 招聘单位 ='" & request("other") &" '
'other是表单提交的值,是写上招聘单位的名称
rstobj.open abc,cnndb,3
end if
if not rstObj.eof then
strsql="INSERT INTO company1(信息,留贴时间) Values('" & request("message") & "','" & Now & "')"
cnndb.Execute strsql
end if
%>
=================================================================
提示错误:abc=" select * form company1 where 招聘单位 ='" & request("other") &" '
我的数据表中有招聘单位字段。
...全文
40 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
99percent 2002-05-22
  • 打赏
  • 举报
回复
=================================
对不起搞错了,不是这个问题。
=================================
<%
set cnndb=server.createobjec("ADODB.connection") constr="Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & _Server.MapPath("login.mdb")
cnndb.open constr
if Not IsEmpty(Request("select")) then
session("lookup_1")=request("select")
end if
if session("lookup_1").value= 1 then
'select是选择下拉菜单名,1是我先设定的值是招聘单位
Set rstObj = Server.CreateObject ("ADODB.Recordset")
abc=" select * form company1 where 招聘单位 ='" & request("other") &" '
'other是表单提交的值,是写上招聘单位的名称
rstobj.open abc,cnndb,3
end if
if not rstObj.eof then
strsql="INSERT INTO company1(信息,留贴时间) Values('" & request("message") & "','" & Now & "')"
cnndb.Execute strsql
end if
%>
===========================================
提示出错:Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: '[string: "企业"]'
============================================
即是说, if session("lookup_1").value= 1 then 这一句。拜托
jxwangzhigang 2002-05-22
  • 打赏
  • 举报
回复
abc=" select * form company1 where 招聘单位 ='" & request("other") &" '
后面还少一个"
cpplus 2002-05-22
  • 打赏
  • 举报
回复
abc=" select * form company1 where 招聘单位 ='" & request("other") &"'"
jxwangzhigang 2002-05-22
  • 打赏
  • 举报
回复
abc=" select * form company1 where 招聘单位 ='" & request("other") &" '
后面还少一个"
popcode 2002-05-22
  • 打赏
  • 举报
回复
少了个"
abc=" select * form company1 where 招聘单位 ='" & request("other") &" '"
jxwangzhigang 2002-05-22
  • 打赏
  • 举报
回复
abc=" select * form company1 where 招聘单位 ='" & request("other") &" '
后面还少一个"

28,391

社区成员

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

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