郁闷不知道哪里错了

cu88815892 2009-05-21 08:56:28
<%
dim startyear
dim startmon
dim startday
dim code
dim inputno

startyear = year(now())
startmon = month(now())
startday = day(now())

Dim conn,rs,strSql1


Set rs=Server.CreateObject("ADODB.Recordset")
strSql1 ="select top 1 no from wzbg order by date desc"
rs.Open strSql1,conn,1

if startmon<10 then
startmon="0"&month(date)
end if
if startday<10 then
startday="0"&day(date)
end if
if startyear&startmon&startday<>left((rs.Fields.Item("no").Value),8) then
code=001
else
code=int(mid((rs.Fields.Item("no").Value),9,3))+1
end if
if len(code)=1 then
code="00"&cstr(code)
end if
if len(code)=2 then
code="0"&cstr(code)
end if
inputno = startyear & startmon&startday&cstr(code)
%>



然后界面里<input name="no" readonly="true" type="CHAR" value="<%response.Write(inputno)%>" />
...全文
78 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
cu88815892 2009-05-21
  • 打赏
  • 举报
回复
select * from wzbg order by date desc
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Recordset 错误 '800a0e79'

对象打开时,不允许操作。

/mysite/zhk/biao1.asp,行125
lzj34 2009-05-21
  • 打赏
  • 举报
回复

response.write strSql1
rs.Open strSql1,db,1,1
cu88815892 2009-05-21
  • 打赏
  • 举报
回复
<%
dim startyear
dim startmon
dim startday
dim code
dim inputno

startyear = year(now())
startmon = month(now())
startday = day(now())



Dim conn,rs,strSql1
Set rs=Server.CreateObject("ADODB.Recordset")
strSql1 ="select * from wzbg order by date desc"

rs.Open strSql1,db,1
'response.Write startyear

这里加个读date怎么写啊!貌似知道问题就是不会写这么办办哦!

if startmon <10 then
startmon="0"&month(date)
end if
if startday <10 then
startday="0"&day(date)
end if


if startyear&startmon&startday <>left((rs.Fields.Item("no").Value),8) then
code=001
'response.Write code
else
code=int(mid((rs.Fields.Item("no").Value),9,3))+1
'response.Write code
end if


if len(code)=1 then
code="00"&cstr(code)
end if
if len(code)=2 then
code="0"&cstr(code)
end if
inputno = startyear & startmon&startday&cstr(code)
'response.Write inputno
%>
heatonc 2009-05-21
  • 打赏
  • 举报
回复
biao1.asp 这是什么页呀
heatonc 2009-05-21
  • 打赏
  • 举报
回复
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
说明你的字段名有错误 或 你字段类型有错误 请检查你的数据库连接情况是否正确 你的SQL语句内容和数据库是否匹配!
cu88815892 2009-05-21
  • 打赏
  • 举报
回复
<input name="no" readonly="true" type="CHAR" value=" <%response.Write(inputno)%>" />

我把他改成<input name="no" readonly="true" type="CHAR" value=" <%response.Write(date)%>" />

就可以显示出来2009-5-21.。。。。。。。。。。边上还是出来了

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Recordset 错误 '800a0bb9'

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

/mysite/zhk/biao1.asp,行120
sy_binbin 2009-05-21
  • 打赏
  • 举报
回复
确定你这个页面有数据库连接代码吗??
cu88815892 2009-05-21
  • 打赏
  • 举报
回复
难道是数据库错了??我已经把no date 改进去了啊!还要改什么啊??
cu88815892 2009-05-21
  • 打赏
  • 举报
回复
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Recordset 错误 '800a0bb9'

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

/mysite/zhk/biao1.asp,行120

shenzhenNBA 2009-05-21
  • 打赏
  • 举报
回复
修改如下:
...
Set rs=Server.CreateObject("ADODB.Recordset")
strSql1 ="select top 1 [no] from wzbg order by [date] desc"
rs.Open strSql1,conn,1
...

28,391

社区成员

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

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