<%
Option Explicit
on error resume next
dim cn
set cn=Server.CreateObject("ADODB.Connection")
cn.open "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("../data/webdata.mdb")&";"
%>
Option Explicit
是强行变量定义,没定义的变量如果使用时出现的话,会报错。
on error resume next
是指有错误就跳过。可以这样理解:碰到(on)错误(error)就跳到(resume)下一句(next)