<HTML>
<HEAD>
<%
'Server对象的CreateObject方法建立Connection对象
Set Conn=Server.CreateObject("ADODB.Connection")
'设置Connection对象的ConnectionString
Conn.ConnectionString="Provider=SQLNCLI.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=MySQLDB; Data Source=localhost"
'连接数据库
Conn.Open
'定义Recordset对象
Set rs=Server.CreateObject("ADODB.Recordset")
'设置rs的ActiveConnection属性,绑定到连接
Set rs.ActiveConnection = Conn
'设置游标类型
rs.CursorType = 3
'打开记录集
rs.Open "SELECT Emp_name, Sex, Title, Wage FROM Employees"
%>
<H2 align=center>显示表Employees的记录</H2>
<TABLE width="
<HEAD>
<%
'Server对象的CreateObject方法建立Connection对象
Set Conn=Server.CreateObject("ADODB.Connection")
'设置Connection对象的ConnectionString
Conn.ConnectionString="Provider=SQLNCLI.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=MySQLDB; Data Source=localhost"
'连接数据库
Conn.Open
'定义Recordset对象
Set rs=Server.CreateObject("ADODB.Recordset")
'设置rs的ActiveConnection属性,绑定到连接
Set rs.ActiveConnection = Conn
'设置游标类型
rs.CursorType = 3
'打开记录集
rs.Open "SELECT Emp_name, Sex, Title, Wage FROM Employees"
%>
<H2 align=center>显示表Employees的记录</H2>
<TABLE width="