| Code | Description |
| AL | Alabama |
| AK | Alaska |
| AZ | Arizona |
| AR | Arkansas |
| CA | California |
| CO | Colorado |
| CT | Connecticut |
| DE | Delaware |
| DC | District Of Columbia |
| FL | Florida |
| GA | Georgia |
| HI | Hawaii |
| ID | Idaho |
| IL | Illinois |
| IN | Indiana |
| IA | Iowa |
| KS | Kansas |
| KY | Kentucky |
| LA | Louisiana |
| ME | Maine |
| MD | Maryland |
| MA | Massachusetts |
| MI | Michigan |
| MN | Minnesota |
| MS | Mississippi |
| MO | Missouri |
| MT | Montana |
| NE | Nebraska |
| NV | Nevada |
| NH | New Hampshire |
| NJ | New Jersey |
| NM | New Mexico |
| NY | New York |
| NC | North Carolina |
| ND | North Dakota |
| OH | Ohio |
| OK | Oklahoma |
| OR | Oregon |
| PA | Pennsylvania |
| PR | Puerto Rico |
| RI | Rhode Island |
| SC | South Carolina |
| SD | South Dakota |
| TN | Tennessee |
| TX | Texas |
| UT | Utah |
| VT | Vermont |
| VI | Virgin Islands |
| VA | Virginia |
| WA | Washington |
| WV | West Virginia |
| WI | Wisconsin |
| WY | Wyoming |
<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" --> <%
Option Explicit ' Not passing parameters, so no parameterized SQL needed Dim rs, conn, command, connection, tableHTML command = "SELECT Code, Description FROM states ORDER BY Description;" Set conn = Server.CreateObject("ADODB.Connection")
connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\path\to\database\examples.mdb'"
conn.open connection
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.open command, conn, adOpenStatic, adLockReadOnly, adCmdText
if NOT (rs.bof AND rs.eof) then
tableHTML = "<table id=""statesTable"">" tableHTML = tableHTML & "<thead><tr><td>Code</td><td>Description</td></tr></thead><tbody>"
while NOT rs.eof
tableHTML = tableHTML & "<tr><td>" & rs("Code") & "</td><td>" & rs("Description") & "</td></tr>"
rs.movenext
wend
rs.close
Set rs = nothing
tableHTML = tableHTML & "</tbody></table>"
end if
conn.close
Set conn=nothing
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>CSS database states table</title> <style type="text/css"> <!-- td { width: 50%; border:1px solid #000000; font-family:Verdana, Arial; font-size:12px; } thead td { font-family: Verdana, Arial; font-weight: bold; background-color: #FFE6BF; } table { width: 400px; margin-left:auto; margin-right:auto; border-collapse: collapse; border:1px solid #000000; } --> </style>
</head>
<body>
<%=tableHTML%>
</body>
</html>
Date Validation Using JavaScript .
Cross-Browser Clipboard Copy .
Loading Images With Remote Scripting .
Why JavaScript In Hyperlinks Is Bad .
Change The Submit Button To Show Waiting For AJAX Response .
European Date Validation Using JavaScript .
Database Results To Client Side Array .
Reading Files With JavaScript .
AJAX For Plain Text And HTML .