how to determine a street address is valid?

Microsoft MapPoint

I'm running into a problem determining a valid street address.

An address such as:

Hwy 99 / Sandrini rd, Bakersfield, CA 93312 (this is an intersection, not a
street number) is consider a valid address for Mappoint because it will use
the city, State, and zipcode to map. OF course, the coordinates is somewhere
within the zipcode and by no means accurate!

My goal is to identify these incomplete addresses and categorize them as
invalid street address with the help of Mappoint.
Is this possible programmatically?

Hi Bill,

I believe your referring to the .MatchingMethod of a record in a DataSet.

Thanks for pointing this out.
However, the example in MSDN link is for manual mapping
I need to know the required columns for a Mappoint.Dataser and
Mappoint.Recordset. The records I use contains Locationaddress1,
Locationaddress2, city,state, zipCode (not standard column names for
address1 & address2).

I hope I'm answering the question ...

To the degree that you look upon MapPoint as a Jet db,
it doesn't care what the names of columns are.
With rs
Do Until .EOF
If .IsMatched Then
If .MatchingMethod <> geoByFindAddress Then
'Flag record in database with actual matchingmethod
End If
End if
End With

here's my problem.
The table is in an SQLserver 2000 database, not an Access database.
I use ADO to put the table in a .NET dataset. How do I convert it into a

Thanks again

I don't understand.
Just import it - it is now a MapPoint dataset.
What am I missing?
here's what I'm doing in .NET 2.0 (VB.NET 2005).
The problem is that I'm passing an ADO dataset AS a Mappoint.Dataset.

I need to know how import an ADO dataset into mappoint.dataset

Thanks again



1. Populate an ADO dataset from an SQLserver
Private Sub btnValidAddress_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnValidAddress.Click

Dim mpsql As String

Dim mpds As MapPoint.DataSet


mpsql = "SELECT * from vw_MP_CustomerLocation "

mpsql += " ORDER by custmasterID, custlocationID"

mpds = Master.MasterData.sqlSelectDataset(mpsql, "wfifuel")

MappointWork.GetValidAddress(mpds) ' I'm passing the dataset mpds to
GetvalidAddress function!

Catch ex As Exception


End Try


End Sub

2. Find valid address

Public Shared Function GetValidAddress(ByVal mds As MapPoint.DataSet) As

'The problem is right here. I'm passing an ADO dataset AS a

'I need to know how import an ADO dataset into mappoint.

Dim objApp As New MapPoint.Application

Dim rs As MapPoint.Recordset

rs = mds.QueryAllRecords()


With rs

Do Until .EOF

If .IsMatched Then

If .MatchingMethod <> MapPoint.GeoMatchingMethod.geoByFindAddress Then


End If

End If



End With

End Function
Hi Bill,

I'm not sure I understeand. If you import then it is a Mappoint dataset.
You cannot pass an ADO dataset AS a mappoint dataset. Or you can fill
the mappoint dataset with the data from your ADO dataset then you have
all control yourself.

Heh, that would be nice wouldn't it?
But no, you can't do that.
You must use ...

Dim oDS as MapPoint.DataSet
Set oDS = oMap.ImportData(etc)
I would like to verify the dataset BEFORE any mapping takes place.
Again, in ADO dataset, I can extract address1, address2, city, state,
zipCode in each row.
Is there a way to add these records to a Mappoint dataset?

Thansk again.


First, no, I don't know of a better way to verify addresses
than to use MapPoint as the "verifier."

If you already have a dataset plotted that you'd rather not
have affected by new 'dirty' data, then import a new dataset
and use the .MoveTo method in conjunction with code already
written in this thread.

Delete the unused dataset afterward.

I hope this helps ...

Last question of the day:
Can I export ADO dataset to either a text file or Excel worksheet (I know
how to do this) then import the resulting dataset (could be map.txt or
map.XLS) back to Mappoint.Dataset (I don't know how to do this)?

Thanks a million!

Oh, I don't charge that much ... :)
Look up the importdata method
Apparently I owed you a lot!
I was able to get the import function working thanks to your help.

Happy to be of service to you, sir.
(I get around, eh?)