Programmatically selecting Unmatched results?

mschoonmaker
01-17-2005, 02:14 PM
I often need to import thousands of records (constantly changing data) into a map. I usually have a hit rate of about 95% or so, but that still leaves ~500 unmatched records per 10,000 database records!

I'm working through this in VB6, and have much of it working, EXCEPT the part about handling the unamtched records. My questions are,

1. can I get a subset of the entire dataset that was imported, but only the unmatched records? How is this done?

2. I'd like to do some SIMPLE comparisons (in code) to see if the street/city/state/zip match up. If so, I'd like to stick a pushpin there anyway.

3. For items that do not match up the street/city/state/zip, I would typically just match the last item in the "Potential Locations" dialog if I were doing this through Mappoint's interface. This turns out to the the ZIP code only match, which is OK as a last resort. Any thought on this?

Thanks in advance,
Mike

Wilfried
01-18-2005, 03:14 AM
Hi Mike,

1. Dont know, sorry
2, 3. If your question was 'is this good idea', then my answer is Yes ! if you wanted some example code then please repost :)

Still a note for the pushpin. Be aware that this is terribely slow, so if you have many records (10000) you need a supercomputer or soon a psycho :)

mschoonmaker
01-18-2005, 07:30 AM
re: q's 2 & 3, yes I was looking for some sample code that might get close to this (sorry for not being clear).

cwrude
01-20-2005, 03:54 PM
One option is to spin through the recordset and look at the IsMatched property of each record

mschoonmaker
01-20-2005, 04:01 PM
Yes, that would be one choice (however inefficient). Seems like there should be a FILTER property that could get set on the recordset to obtain ALL records that were not matched.

Wilfried
01-21-2005, 04:19 AM
Hi,

Yes, that would be one choice (however inefficient).

Unless you do that when adding the records one by one and then check the property. Not sure but I dont think you loose much cpu time.

Filters ofthen do the same. When set they walk trough each record to check if it is valid.

mschoonmaker
01-21-2005, 06:03 AM
So you think adding records one by one is as efficient as a ImportData() method? Surprising.

Wilfried
01-21-2005, 07:13 AM
Hi,

I'm definitively not sure, but it is wodth to try it in a small separate test case. Could be that there is almost no difference, depending on how it is internally constructed.

 
Web mp2kmag.com
mapforums.com