View Full Version : Querying Data
01-28-2003, 12:55 PM
I am using the Mappoint control in VB 6 to generate maps from data stored in Access. When mapping is completed, I want to be able to drill through from regions on map to the underlying data. So when I hover on a region (say county or zip) Mappoint tells me how many names are aggregated. I want to click through to those names.
Any ideas on how to do this? I guess I can use QueryAllRecords and loop through the entire recordset, but this will probably be too slow. Seems like there should be an easy way to do this. Am I missing something?
Thanks in advance for any/all help!
01-31-2003, 12:10 PM
Hi…if I understand your issue correctly, what I’d do is set up a handler for the selection changed event. In that event, pull a key from the selected object and then retrieve the data from a parallel database. i.e. not from MapPoint. Note, if you go this route, don’t leave a modal dialog hanging in the event handler…if you do, MP will throw an OLE timeout error. In VB 6, an easy way around this is to enable a sleeping timer control in the selection changed handler and then let the timer control pop up the dialog box.
Another strategy to solve your issue would be to geocode your aggregated data as a pushpin set with fields for each of the data you want to show. In this method, you get all the nice MP balloon etc. The downside is your user has to click on a mysterious pin rather than a nice, labeled region.
Hope this helps.
02-03-2003, 12:29 PM
Thanks for your help. I have pretty much already resigned myself to going against a parallel db and will do so. Thanks also for the tip regading modal dialogs - learned about this one the hard way...
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO