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?

Bill
Hi Bill,

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

Thanks for pointing this out.
However, the example in MSDN link
http://msdn2.microsoft.com/en-us/library/aa493231.aspx is for manual mapping
verification.
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).

Bill
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.
Aircode:
rs.MoveLast:rs.MoveFirst
With rs
Do Until .EOF
If .IsMatched Then
If .MatchingMethod <> geoByFindAddress Then
'Flag record in database with actual matchingmethod
End If
End if
.MoveNext
Loop
End With
Micheal;

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
Mappoint.Dataset?

Thanks again

Bill
I don't understand.
Just import it - it is now a MapPoint dataset.
What am I missing?
Michael;
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



Bill

--------------


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

Try

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

MsgBox(ex.ToString)

End Try

MsgBox("done")

End Sub

2. Find valid address

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

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

'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()

rs.MoveFirst()

With rs

Do Until .EOF

If .IsMatched Then

If .MatchingMethod <> MapPoint.GeoMatchingMethod.geoByFindAddress Then

MsgBox("invalid")

End If

End If

.MoveNext()

Loop

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.
<Snip>

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)
Michael;
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.

Bill
Bill,

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 ...
Michael;

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!

Bill
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.

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