簡單回答一下
<%
setconn=server.createobject("adodb.connection")
conn.open"driver={microsoftaccessdriver(*.mdb)};dbq="&server.mappath("資料庫路徑")
%>
setrs=server.creatobject("adodb.recordset")
sql="select*from你的表"
rs.opensql,conn,1,3
<select>
<%dowhilenotrs.eof%>
<optionvalue=“<%=rs("表中欄位")%>”><%rs("表中欄位")%></option>
rs.movenext
loop
</select>
rs.close
setrs=nothing
conn.close
setconn=nothing
簡單回答一下
<%
setconn=server.createobject("adodb.connection")
conn.open"driver={microsoftaccessdriver(*.mdb)};dbq="&server.mappath("資料庫路徑")
%>
<%
setrs=server.creatobject("adodb.recordset")
sql="select*from你的表"
rs.opensql,conn,1,3
%>
<select>
<%dowhilenotrs.eof%>
<optionvalue=“<%=rs("表中欄位")%>”><%rs("表中欄位")%></option>
<%
rs.movenext
loop
%>
</select>
<%
rs.close
setrs=nothing
conn.close
setconn=nothing
%>