Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2004, 10:30 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update city field based on zip field

I have sql 2k and created a asp page for a user to enter in new client info (name, address, phone, etc). I have a sql table called tblZip that has zipcode and the corresponding city and state.

If a user enters a zip code, I want the corresponding city and state to be displayed. I have heard of codes going to a new page or refreshing a page with the results. I want to be able to keep any existing data the user already has entered and allow them to finish the form. Plus I want the user to be able to change the zip if needed before saving the info.

Does anyone have a sample code for this?

Plus, I assume I should only store the zip info...and just display the city and state. Do I really need to store the city and state in their own fields in the table?

Thanks!
Ngan





Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill field based on another field skwilliams Classic ASP Basics 3 December 30th, 2006 11:02 AM
Updating a Date field based on another field arholly Access VBA 6 November 22nd, 2006 11:19 AM
Create lookup based on field value s.hendy Access 2 May 20th, 2005 04:08 AM
Calculating a field based on a lookup range nrwatson Access VBA 1 April 29th, 2004 06:41 PM
Getting data based on field selection Trojan_uk Classic ASP Basics 1 December 9th, 2003 10:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.