asp文件:
<%@ Language=VBScript %>
<%Option Explicit%>
List <%
dim conn
dim rs
dim sql
dim count
dim rs1
dim sql1
set conn = server.CreateObject ("adodb.connection")
conn.Open "test","sa",""
sql = "select * from district order by locationid asc"
set rs = conn.execute(sql)
%>
数据库:
create table location
(
locationid char(2) not null primary key,
locationname char(50) not null
)
create table district
(
districtid char(3) not null primary key,
districtname char(50) not null,
locationid char(2) not null
)