Response.
Response.Write rs("column1") & " " & rs("column2") & "
"
rs.MoveNext
当前时间是:<%= Now %>
欢迎来到我的ASP页面!
这是一个简单的ASP页面示例。
Dim conn, rs
Do While Not rs.EOF
Loop
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = conn.Execute("SELECT * FROM mytable")
conn.
conn.Close
conn.Open "Provider=Microsoft.Jet.OLEDB.0;Data Source=mydatabase.mdb;"
rs.
rs.Close
"Provider=Microsoft.Jet.OLEDB.0;Data Source=mydatabase.mdb;"
%>
conn =
rs = conn.
rs("column1") & " " & rs("column2") & "
"
rs.EOF
"VBScript"
%>
("SELECT * FROM mytable")
.CreateObject("ADODB.Connection")
使用服务器端脚本
准备工作
编写第一个ASP页面
安装步骤
数据库访问
运行ASP页面
<%
<%= Now %>
<%@
<%@ Language="VBScript" %>
<%
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.0;Data Source=mydatabase.mdb;"
Set rs = conn.Execute("SELECT * FROM mytable")
Do While Not rs.EOF
Response.Write rs("column1") & " " & rs("column2") & "
"
rs.MoveNext
Loop
rs.Close
conn.Close
%>
<%@ Language="VBScript" %>
当前时间是:<%= Now %>
<%@ Language="VBScript" %>
欢迎来到我的ASP页面!
这是一个简单的ASP页面示例。
<%@ Language="VBScript" %>
<%@ Language=