dim driverName,chs driverName="Driver={mysql odbc 3.51 driver};server=localhost;database=test;uid=loaer;pwd=123456;" set conn=server.createobject("adodb.connection") conn.open driverName
'查询之前先执行下面这一句 set chs=conn.Execute("SET NAMES 'gb2312'")
'查询数据库表
sql = "SELECT * FROM tb_commondata" Set rs = conn.Execute(sql)