首先是ASP與數據庫建立連接
<%
set dbconnection=Server
DBPath = Server
dbconnection
建立與數據庫的連接
SQL=
SET CustomerList=dbconnection
%>
建立SQL查詢語句
<html>
<body>
<FONT SIZE=
<CENTER>
<TABLE BORDER=
<tr>
<td>編號</td>
<td>公司名稱</td>
<td>聯絡人姓名</td>
<td>所在城市</td>
<td>電話號碼</td>
</tr>
<% DO WHILE NOT CustomerList
檢測記錄是否到了最後一條
<TR>
<TD><% =CustomerList(
<TD><% =CustomerList(
<TD><% =CustomerList(
<TD><% =CustomerList(
<TD><% =CustomerList(
</TR>
<% =CustomerList(
<% CustomerList
loop
%>
如果還沒有到最後一條則指針移動到下一條
</TABLE>
</CENTER>
<center>
<input type=
</center>
</BODY>
</HTML>
缺陷
From:http://tw.wingwit.com/Article/program/net/201311/13022.html