Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Access with ASP on the Internet

 Home > Articles <% response.write "> " & crumb %>


Disaster Recovery Plan
Access Forms Help
MS Access Versus
Replication of Database
Software Risk Assessment
Choose a Consultant
Faster Access Database
Access Web Database
ODBC Access Examples
Microsoft Access, Why?
Repair Corrupted Table
Access to QuickBooks

Image Gallery

Find City, State, County and ZIP Information

Quickly Find Maps and Weather Too

Enter any combination of ZIP and/or City and/or State then press the submit button

ZIP:     City:     State:

<% ' lookup zip dim rst dim sql dim strzipcode dim strConnect dim strmaplink dim strcity dim strstate dim qrycity dim qrystate dim qryzipcode dim numchkspace dim strhold dim ado_OpenKeyset dim ado_lockoptimistic dim href dim conn dim dsntest If IsObject(Session("blueclawdb_conn")) Then Set conn = Session("blueclawdb_conn") Else Set conn = Server.CreateObject("ADODB.Connection") conn.open "BLUECLAWDB","Admin","" Set Session("blueclawdb_conn") = conn End If '--------------------------------- 'Set Conn = Server.CreateObject("ADODB.Connection") 'DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; " '--------------- connection below works!----------------- 'DSNtest=dsntest & "Server=http://hewlett-xp; dbq=" & Server.MapPath("web_app.mdb") '--------------- connection below works!----------------- 'DSNtest=dsntest & "Server=hewlett-xp; dbq=" & Server.MapPath("web_app.mdb") '--------------- connection below works!----------------- 'DSNtest=dsntest & "Server=; dbq=" & Server.MapPath("web_app.mdb") '---------------------------------------------------------- 'Conn.Open DSNtest Set rst = Server.CreateObject("ADODB.Recordset") ' get parameters from user strzipcode = request.querystring("zipcode") qryzipcode = strzipcode strcity = request.querystring("city") qrycity = strcity strstate = request.querystring("state") qrystate = strstate ' check to make sure they are not all blank! if strzipcode="" and strcity="" and strstate ="" then else 'strmaplink="http://clients.mapquest.com/netscape/mqinterconnect?screen=find&link=results&WIDTH=800&HEIGHT=600&streetaddress=&city=" & strcity & "&state=" & strstate & "&zip=" & strzipcode & "&country=&x=31&y=13" strmaplink="http://www.mapquest.com/maps/map.adp?country=US&countryid=250&addtohistory=&address=&city=" & strcity & "&state=" & strstate & "&zipcode=" & strzipcode & "&submit=Get+Map" if strzipcode="" then qryzipcode="%" end if if strcity = "" then qrycity = "%" end if if strstate = "" then qrystate="%" end if ' get records sql = "select zip, city, state, county from zip where (zip like " & "'" & qryzipcode & "'" & " and city like " & "'" & qrycity & "'" & " and state like " & "'" & qrystate & "'" & ")" rst.Open sql, conn, 3, 3 Set Session("ZIP_SHORT_rst") = rst 'check for no match if rst.eof then %>

<% response.write "We could not find a record matching those entries.Please try again." else ' show results %>

<% do while not rst.eof href="" response.write "" rst.movenext loop %>
State City County ZIP
" & rst("state") & "" & rst("city") & "" & rst("county") & "" & href & rst("zip") & "

Click on a ZIP code to see the weather for that area
See A Map Based on Your Entries

Our Access / Active Server Page Examples:
ASP Bar Chart with Access Database
Zip Code Lookup ASP Example   (you are here)
Sales Rollup by Region ASP Example

Back to Active Server Page Home Page

<% end if 'build map link 'substitute spaces with + signs first do while instr(strcity," ")<>0 numchkspace=instr(strcity," ") strhold=mid(strcity,1,numchkspace-1) strcity=strhold & "+" & mid(strcity,numchkspace+1,len(strcity)) loop end if set rst = nothing set conn = nothing %>

Note: This Active Server Page is retrieving information from a Microsoft Access database located on our NT Domain Server.   The database could reside on any SQL compliant source such as Oracle,  etc.

<% ' next is for adsense ads and dynamic code Randomize rnum = Int(Rnd * 3) + 1 iphrase=rnum rnum=1 if rnum= 1 then response.write "
" end if if rnum=2 then response.write "
" end if if rnum=3 then response.write "
" end if %>

<% randomize iphrase = Int(Rnd * 7) + 1 response.write "" if iphrase=1 then response.write "We have dozens of downloadable Access databases for you to learn and examine." end if if iphrase =2 then response.write "Blue Claw Database Design is your premier source of Microsoft Access Programming and database support." end if if iphrase =3 then response.write "Our Access Programmers work with clients all over the world through the Internet. Let us help you today: contact page" end if if iphrase = 4 then response.write "Since 2000 we have developed 100's of databases for clients throughout the world. See a sample of them at our recent clients page." end if if iphrase = 5 then response.write "Our programming team has 15 members containing a wide variety of technical database knowledge and programming experience. We are kind of like Allstate Insurance - 'we have seen it before'." end if if iphrase =6 then response.write "Microsoft Access is a fully capable database and it's primary limitations is the number of concurrent users it will support. The number of users supported depends on the transaction load and the amount of data but generally we recommend a limit of 10 to 15 users." end if if iphrase =7 then response.write "Are you just starting out on your quest for a database? Need some advice or someone to bounce ideas off of? We are here and will be happy to chat with you on the phone and discuss options to your situation. Visit our contact page and give us a call." end if %>

<% randomize iphrase = Int(Rnd * 8) + 1 if iphrase = 1 then response.write "We also have 100's of programming examples from simple to complex. You can jump to our Access tutorials here. Visit our contact page if you have comments or questions." end if If iphrase = 2 then response.write "We also offer Microsoft SQL Server / Azure / Cloud database development through our programmer partnership with IT Impact. " end if if iphrase =3 then response.write "Do you and your clients need access to data on the Internet? We can create a secure system to match your requirements perfectly." end if if iphrase = 4 then response.write "Did you know you don't need to move to SQL/Server to run and manage you Access database on the net. There are many alternative solutions. Among them are Amazon's AWS cloud services and various hosting services in nearly every state." end if if iphrase =5 then response.write "We create databases large and small. Some of our databases help run entire small businesses including travel agencies and airline reservation systems. We also handle unique businesses such as fly rod manufacturing. Did you know there are 11 steps in the making of a fly rod?" end if if iphrase =6 then response.write "Are you looking for an MS Access template database? We have many for sale in our Access Template and Examples Software section." end if if iphrase =7 then response.write "Did you know that most template databases do not do exactly what you need done? We can create a custom template that fits your needs exactly for a small to medium Access database at a reduced cost. See our contact page and call Joseph Dean for more info." end if if iphrase =8 then response.write "We have expert enterprise-level database development capabilities for cloud/web-based databases through our partnership with IT Impact." end if response.write "" %>

Contact Information

<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>