|
| |
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
zipcode return addresses - 4/18/2001 20:04:00
On a website, I need to have a customer input a zipcode into a form and based on that, then display dealers in their area, in a popup window. There are only 17 dealers. All zipcodes outside the dealer areas will default to the factory address. If someone could get me started, I believe I could finish it. I don't know how to do this as a database. Can it be done strictly with javascripting? Or database and java? The popup window would be javascripting, which I could do. Any ideas welcome. thanks, joel
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: zipcode return addresses - 4/18/2001 20:10:00
Assuming all dealers in the area have the same zip, then it would be a database query "where ZIP = 'FormInput'"The link (or form) would be targeted to a new or popup window to display the results
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/18/2001 20:50:00
quote: Originally posted by Spooky: Assuming all dealers in the area have the same zip, then it would be a database query "where ZIP = 'FormInput'"The link (or form) would be targeted to a new or popup window to display the results
Each dealer is different over 4 states. And if you type in your zip, then you want dealers in your "area", which means not using the 5 number zip, but keyed to the first 3 numbers only. How would I therefore, key the zip to just look at the first 3 numbers and key on those for choosing the right dealers?
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: zipcode return addresses - 4/18/2001 20:51:00
You could use a 'like' query where you select 'begins with'Select * from table where zip LIKE '::forminput::%' The field in the database would need to be text however.
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/23/2001 17:40:00
quote: Originally posted by Spooky: You could use a 'like' query where you select 'begins with'Select * from table where zip LIKE '::forminput::%' The field in the database would need to be text however.
Hey Spooky, We are real close here! I used the Database Results Wizard to set up the query to ask for Zipcodes, and it works great. But I don't know how to get it to return more than the exact zipcode for a given area (ie. all 985XX zipcodes in the 985 area...it only returns Exact zipcodes now and I don't see any choices from the Criteria window). Here is the sql line: fp_sQry="SELECT * FROM actable1 WHERE (Zipcode = ::Zipcode: " Are you saying, (Zipcode = Like ::Zipcode: " at this place? I tried it, and when I went to Save, it overrode what I typed and returned it to the way it was. Could this be modified at the Criteria > Value ? It just seems like there is a logical way to solve this, but I'm just missing it... Very much appreciate you help here, joel
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/23/2001 19:20:00
quote: Originally posted by jgraves: Hey Spooky, We are real close here! I used the Database Results Wizard to set up the query to ask for Zipcodes, and it works great. But I don't know how to get it to return more than the exact zipcode for a given area (ie. all 985XX zipcodes in the 985 area...it only returns Exact zipcodes now and I don't see any choices from the Criteria window). Here is the sql line: fp_sQry="SELECT * FROM actable1 WHERE (Zipcode = ::Zipcode: " Are you saying, (Zipcode = Like ::Zipcode: " at this place? I tried it, and when I went to Save, it overrode what I typed and returned it to the way it was. Could this be modified at the Criteria > Value ? It just seems like there is a logical way to solve this, but I'm just missing it... Very much appreciate you help here, joel
Hey Spooky, One more thing...I get this Error Message: Database Results Error Description: [Microsoft][ODBC Microsoft Access Driver] Extra ) in query expression '(Zipcode = )'. Number: -2147217900 (0x80040E14) Source: Microsoft OLE DB Provider for ODBC Drivers One or more form fields were empty. You should provide default values for all form fields that are used in the query. In the Table of the database, Every field has something in it. Are they talking about something else? thanks again
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/23/2001 23:05:00
quote: Originally posted by jgraves: Hey Spooky, One more thing...I get this Error Message: Database Results Error Description: [Microsoft][ODBC Microsoft Access Driver] Extra ) in query expression '(Zipcode = )'. Number: -2147217900 (0x80040E14) Source: Microsoft OLE DB Provider for ODBC Drivers One or more form fields were empty. You should provide default values for all form fields that are used in the query.
In the Table of the database, Every field has something in it. Are they talking about something else? thanks again
Hi Spooky, Well, I've been working on this for three days now: Still trying to get multiple returns for a zipcode entry. Question: Using the Database Results Properties, you come to the Pg 3 of 5: More Options , Criteria...to get the exact Zipcode, I type in Zipcode - Equals - [zipcode] - And. Works fine. But I believe this would be where the Range Criteria would be added, but I tried typing Zipcode - greater than - 98000 - or, then Zipcode - less than - 98100 - and, then the next Range... , etc. Trying to capture the Range 98000 to 98100...It didn't work???
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: zipcode return addresses - 4/23/2001 23:38:00
At step 3 > more options do :Zipcode - Begins with - [zipcode] This will look for 985XX
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/23/2001 23:57:00
quote: Originally posted by Spooky: At step 3 > more options do :Zipcode - Begins with - [zipcode] This will look for 985XX
Hi Spooky, Of course, Begins with is not an option in the wizard, So in the gray area, I replaced EQ (Equals) with Begins with, to get the following: s-criteria="{Zipcode} Begins with {zipcode} +" s-order. It still returned as if Equals was in effect.
|
|
|
|
Guest
|
RE: zipcode return addresses - 4/24/2001 20:21:00
I am working on this thing now.http://www.iprocessservers.com/testpages/zip.asp This is a "nearest dealer" locator. You enter a zip code and it will find all persons on my DB within 90 miles. If this is what you are looking to do, then FP DRW won't work. If you want more info email me at richard@iprocessservers.com and I'll tell you how I did it. (not easy)
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/24/2001 20:23:00
quote: Originally posted by Rick Z: I am working on this thing now.http://www.iprocessservers.com/testpages/zip.asp This is a "nearest dealer" locator. You enter a zip code and it will find all persons on my DB within 90 miles. If this is what you are looking to do, then FP DRW won't work. If you want more info email me at richard@iprocessservers.com and I'll tell you how I did it. (not easy)
Hi Ricky Z, I do not want the latitude and longitude program which then determines distance. I know that the criteria for the answer is simple, because I've done similar array formulas in Excel to get similar answers. It's like only a simple symbol or code fragment is missing to make this work. "zipcode > 98000 or < 98100, and, > 98300 or < 98400".... Or something to this effect, would capture the target ranges. Then ANY entered zipcode, say in the 98000 series, would return all zipcodes in the database that fell in that range. That's the plan, anyhow. Remember, it is working now if you enter the Exact zipcode. thanks
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: zipcode return addresses - 4/24/2001 17:00:00
Errr... sorry? "Of course, Begins with is not an option in the wizard"I think you may not have converted the field to text? it wont show otherwise. You can only do a "like" query on a text field. Doing a between query takes a little more work.... 
|
|
|
|
KevinB
Posts: 14 From: Mission Viejo, CA USA Status: offline
|
RE: zipcode return addresses - 4/24/2001 18:44:00
How about making a query in your database which parses the first 3 numbers in the zip code, and make that the field which your query looks at.
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/24/2001 19:04:00
quote: Originally posted by Spooky: Errr... sorry? "Of course, Begins with is not an option in the wizard"I think you may not have converted the field to text? it wont show otherwise. You can only do a "like" query on a text field. Doing a between query takes a little more work.... 
Spooky: I think we've almost got this one licked...I changed the numbers to text and put in, Begins with 980, or, Begins with 983, or, etc. But, When testing, I got the msg, "Database Results Error, Data type mismatch in criteria expression." Where is the problem here? thanks joel
|
|
|
|
Spooky
Posts: 26597 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: zipcode return addresses - 4/24/2001 21:58:00
Sorry, forgot that part  The DRW is still expecting a numeric field, which is what you told it in the first place.Youll have to quickly rebuild the DRW by steping through the wizard again, so that it recognizes the fact that you have changed a field type from numeric to text. ------------------ Spooky "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
|
|
jgraves
Posts: 24 From: Lacey, WA, USA Status: offline
|
RE: zipcode return addresses - 4/25/2001 23:55:00
quote: Originally posted by Spooky: Sorry, forgot that part  The DRW is still expecting a numeric field, which is what you told it in the first place.Youll have to quickly rebuild the DRW by steping through the wizard again, so that it recognizes the fact that you have changed a field type from numeric to text.
Well Spooky, All of this hasn't worked as planned. I tried all of the Begins With, Like, Contains, Less Than, Greater Than combinations. And tried all of the AND & OR combinations. Then tried creating other zipcode columns in the database, labeled Zipcode2, Zipcode3, etc. with the 980, 967, values. So if Equals zipcode, then also Begins With 980, or And Contains 980, etc. I then ensured that I had Selected the columns for ORDERING, which made no difference. I often find that using OR makes all of the possible zipcodes show up on the page prior to a choice being made. Ugh! On the face of it, the logic is not complicated ... :^( So, what am I doing wrong here? thanks, joel
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|