#22003/7/19 11:10:04
定义的变量名称不一样
你把第二种中的名称换一下就是:
dbfile=Server.MapPath("guestbook.mdb")
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbfile
然后把dbfile就像作数学题一样代入就是:
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("guestbook.mdb")
然后把第一种的strconn代入:
set conn = server.createobject("adodb.connection")
conn.open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("aspfree.mdb")
然后两种比较