Obtaining a recordset in VFP

Microsoft MapPoint

Hi,
I have the following VFP code, I want to return a record set that contains
the zip that fall with a shape (radiua, drive time, etc).
When I try to create the recordset I get a messagebox with "OLE error code
0x80070005:Access is denied."

The code is as follows:
PUBLIC omap,omp,oshp,objloc
omap = CREATEOBJECT('mappoint.application')
omp=omap.NewMap
omap.UserControl = .t.
omap.Visible = .t.

ds=omp.DataSets.GetDemographics.DisplayDataMap(,,12)
objloc = omp.findresults(['379 Thornall St, Edison, NJ, 08837']).item(1)
omp.Location = objloc
oshp=omp.Shapes.AddDrivetimeZone(objloc,60/1440)
rs=omp.DataSets(1).Queryshape(oshp)
Essentially, it's because QueryShape is not supported on recordsets derived from
demographics.

"QueryShape method
Returns a Recordset object containing the records located within a shape drawn
on the map. Returns an error for data sets with a HowCreated property of
geoDataSetDemographic."

However, you could import/link the demographic info using a query and a datalink
file for the USADemo.mdb database. Then QueryShape would return what you're
expecting.

Paul
Paul,
Thanks for the info, I will try to implement using your suggestion.
I am basically trying to mimic the export to excel functionality.
Thanks again.......Chris