日期:2014-05-17 浏览次数:21134 次
'测试读取MySql数据库的内容
const adopenstatic=3
const adlockpessimistic=2
strconnection="driver={mysql odbc 5.1 driver};database=test;server=localhost;uid=root;password=dubu"
'无需配置dsn
set conn = server.createobject("adodb.connection")
conn.open strconnection
response.write "连接成功"&"<p>"
set rconn=server.CreateObject("adodb.recordset")
rconn.open "test",conn,adopenstatic,adlockpessimistic
rconn.pagesize=5
response.Write "记录总数"&rconn.recordcount
response.Write "总页数"&rconn.pagecount