hurry,help me!!!(beg you)

asgates 2001-12-07 07:51:44
代码为:
<!--#include file= "..\dataopen.asp"-->
<%
thisweek= request.form("thisweek")
nextweek= request.form("nextweek")
sql1=(request.form("name")) & "','" &(request.form("dep")) &"','" & thisweek &"','" & nextweek
sql2="insert into plan(name,dep,thisweek,nextweek) values('" & sql1 &"')"
response.write sql2
conn.Execute(sql2)
conn.close
%>

其中dataopen.asp为:

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.open "filedsn=C:\Program Files\Common Files\ODBC\Data Sources\jzqbdata.dsn"
%>


错误为:
insert into plan(name,dep,thisweek,nextweek) values('lh','lhh','bb','bb')
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'plan'.

/工作计划管理/confirm.asp, 行8

...全文
136 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
asgates 2001-12-07
  • 打赏
  • 举报
回复
我好了!!
只是改改表名和字段名!不可诗意!!!


baggio785 2001-12-07
  • 打赏
  • 举报
回复
这么写试试
sql2="insert into plan(name,dep,thisweek,nextweek) values('" & name &"','" & dep &"','" & thisweek &"','" & nextweek &"')"
asgates 2001-12-07
  • 打赏
  • 举报
回复
who help me?
asgates 2001-12-07
  • 打赏
  • 举报
回复
name dep thisweek nextweek time
type is :
varchar varchar text text datetime
asgates 2001-12-07
  • 打赏
  • 举报
回复
name dep thisweek nextweek time
type is :
varchar varchar text text datetime
efax 2001-12-07
  • 打赏
  • 举报
回复
你的字段thisweek,nextweek是什么类型的,这里面肯定是字段有问题
如果thisweek,nextweek是datetime,则应写为;
<%
thisweek= cdate(trim(request.form("thisweek")))
nextweek= cdate(trim(request.form("nextweek")))
sql1=(request.form("name")) & "','" &(request.form("dep")) &"','" & thisweek &"','" & nextweek
sql2="insert into plan(name,dep,thisweek,nextweek) values('" & sql1 &"')"
response.write sql2
conn.Execute(sql2)
conn.close
%>

asgates 2001-12-07
  • 打赏
  • 举报
回复
都查了!
who help me????
i am crazy!!!!!!
25475360 2001-12-07
  • 打赏
  • 举报
回复
好像语法没有错呀,检查一下链接或打开方式吧
asgates 2001-12-07
  • 打赏
  • 举报
回复
上面大哥,我试过了,不是这个!
who can help me??????
asgates 2001-12-07
  • 打赏
  • 举报
回复
请问错在何处?
victor_jolin 2001-12-07
  • 打赏
  • 举报
回复
Execute函数会返回一个Recordset对象

28,406

社区成员

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

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