初中地理总结人教版:关于编程的一个问题请较大哥?

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 20:53:40
Microsoft VBScript 编译器错误 错误 '800a0401'

语句未结束

/company/spzs.asp,行1

const MaxPerPage=3dim totalPut dim CurrentPagedim TotalPagesdim iif not isempty(request("page")) thencurrentPage=cint(request("page"))elsecurrentPage=1end ifdim sqldim rsdim rstypeif not isEmpty(request("id")) thenid=request("id")elseid=1end ifmysql="select * from qyml where id="+cstr(id)+"" Set myrs= Server.CreateObject("ADODB.Recordset") myrs.open mysql,conn,1,1 gsid=myrs("id")
这是我的网页一个页面在打开后出现以上东西请问错在那里怎么修改?我不会呀请指明

VBSCRIPT里面一句一行,千万不要所有句子都挤在一起,VB编译程序自己都看不懂.
改成这样试试
const MaxPerPage=3
dim totalPut
dim CurrentPagedim TotalPagesdim i
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sqldim rsdim rstype
if not isEmpty(request("id")) then
id=request("id")
else
id=1
end if
mysql="select * from qyml where id="&cstr(id)
Set myrs= Server.CreateObject("ADODB.Recordset")
myrs.open mysql,conn,1,1
gsid=myrs("id")