MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




QueryAllRecords Fails

This is a discussion on QueryAllRecords Fails within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have the following set of data in a tab-separated TXT file: 46038 North Zone 46032 North Zone 46027 North ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-29-2002
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
QueryAllRecords Fails

I have the following set of data in a tab-separated TXT file:

46038 North Zone
46032 North Zone
46027 North Zone
46013 South Zone
46018 South Zone
46019 South Zone
46020 South Zone

I import this data successfully into Mappoint using ImportTerritories method. Immediately after importing the data, I do a query on the Mappoint control using QueryAllRecords method. The method returns 7 records and I am able to access each record successfully.

After this I add a zipcode to territory North Zone using TERRITORY MANAGER. Immediately after this I again query the dataset. Now, the recordset returned is EMPTY! (EOF and BOF are TRUE); RecordCount = 7 (NOT 8!) and I am not able to access the individual records.

If I close the TERRITORY MANAGER and requery, the dataset is still EMPTY! (EOF and BOF are TRUE); But now RECORDCOUNT=8!!! But I am still not able to access the individual records.

Why does this happen? How can I access the Dataset again to get 8 records? Is this a bug?

Thanks and regards
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-25-2002
Junior Member
White Belt
 
Join Date: Nov 2002
Posts: 2
I am having the same troubles

I have created an addin with MapPoint 2002 which grabs the dataset on the active map and updates our SQL database.
If I first import the data and the save the dataset to our database everything runs smoothly, however if I change territories while in MapPoint and then try to update nothing happens.

After changes the dataset contains approx. 3000 records when I do a recordcount. After setting the recordset to the dataset.QueryAllRecords I find that there aren't any records in the recordset. How could there be 3000 records in the data set and zero in the recordset? Here is code on how I set things up.

Dim rsMapPoint as MapPoint.Recordset
Dim mpDataSet as MapPoint.DataSet
Dim objApp as MapPoint.Application
Dim mpMap as MapPoint.Map
Dim iRecordCount as Integer

Set mpMap = objApp.ActiveMap
Set mpDataSet = mpMap.DataSets(1)
iRecordCount = mpDataSet.RecordCount 'iRecordCount contains 3034

Set rsMapPoint = mpDataSet.QueryAllRecords

After this code I find that rsMapPoint contains zero records after doing a BOF/EOF test.

Does anyone know why this happens?
Like I said above if I import data and then run this same code without making any changes in MapPoint the rsMapPoint recordset contains the same number of records as the mpDataSet dataset. Only after making manual changes do I have problems.
Thanks for any input,
Jon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
fails, queryallrecords


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
OLE error 80040E04 when using QueryAllRecords or QueryCircle stephenmillington MapPoint 2006/2009 Discussion 6 12-08-2005 08:04 AM
Find fails with full install but not partial Tony Kobine MapPoint 2006/2009 Discussion 0 08-19-2005 04:50 AM
Link Data Wizard fails Anonymous MapPoint 2006/2009 Discussion 0 10-24-2004 09:03 PM
QueryAllRecords Fails Anonymous MapPoint 2006/2009 Discussion 0 08-29-2002 06:08 PM
--VB DEVELOPER-- The method QueryAllRecords of a d.... Anonymous MapPoint 2006/2009 Discussion 4 05-27-2002 08:50 AM


All times are GMT -5. The time now is 10:53 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54