|
| |
|
|
ACEDISH
Posts: 176 Joined: 9/30/2002 From: Manassas, Virginia Status: offline
|
Geocoding using Replace and Trim - 6/26/2006 11:58:05
Hello,. I am geocoding addresses from a database and ran into weird problem, I had to replace spaces in the address with a "+" for the geocoder I am using. 1234 Main St. to 1234+Main+Street My query worked only on about half the addresses in the database. what was happening was that the addresses that did not geocode where not converting as above, they still showed the space between. Whats really baffeling me is that when the address is displayed in a form field I cut and paste it back into the same field and post to the geocoder it works fine... I am replacing the spaces with + using the following: databaseaddress=Replace(Trim(address)," ","+")
_____________________________
" Anyone who can only think of one way to spell a word obviously lacks imagination"
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Geocoding using Replace and Trim - 6/26/2006 12:02:13
Just a guess but they may not be spaces but rather instead. Try using that in the repace as well. Maybe something like: databaseaddress=Replace(Replace(Trim(address)," ","+")," ","+") That any help?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
ACEDISH
Posts: 176 Joined: 9/30/2002 From: Manassas, Virginia Status: offline
|
RE: Geocoding using Replace and Trim - 6/26/2006 13:10:22
I tried that but still no luck, any other charactors that might represent a space?
_____________________________
" Anyone who can only think of one way to spell a word obviously lacks imagination"
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Geocoding using Replace and Trim - 6/26/2006 14:21:42
%20 or CHR(032) possibly? It sounds like you're trying to URLEncode it. Have you looked at that instead of using 'Replace'?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
ACEDISH
Posts: 176 Joined: 9/30/2002 From: Manassas, Virginia Status: offline
|
RE: Geocoding using Replace and Trim - 6/26/2006 16:57:46
I am not familiar with that approach but i did identify the following charactors chr(9) & chr(13) & chr(32) that may represent a space. I am hot sure of how to implement it.
_____________________________
" Anyone who can only think of one way to spell a word obviously lacks imagination"
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Geocoding using Replace and Trim - 6/27/2006 7:50:49
quote:
chr(9) & chr(13) & chr(32) Those represent 'tab' 'carriage return' and 'space' respectively. You can get rid of them all in the same line as above like so: databaseaddress=Replace(Replace(Replace(Replace(Trim(address)," ","+"),chr(032),"+"),chr(013),"+"),chr(009),"+")," ","+") I am surprised that you had no luck with the URLEncoding tho.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
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
|
|
|