This project has moved. For the latest updates, please go here.

OledbPoint query

Topics: General Topics
Aug 18, 2006 at 12:10 PM
Hey guys

My application is running nicely...Just one concern though...
Im using the Oledbpoint Provider to filter data from a SQL database...If the query brings back one record the map is not displayed...but as soon as query bring back more then one record it works fine...For Zoom purposes I used the ZoomToBox method...What should I use wen the query brings back one record...or is it right as is...

Thanx in advance
Aug 18, 2006 at 3:51 PM
The box of one point has an area of zero. Therefor the corresponding zoom value is also zero, which explains why you don't get a render. You should make sure you never set the minimum zoom-value below a certain threshold.

if(myMap.Zoom<0.001) myMap.Zoom = 0.001;

Another good approach is to always zoom out slightly to your resulting dataset, so that you have an edge around your data. Ex:
Aug 21, 2006 at 8:17 AM
Hi there
Thanx so much for the help...It works very well

Thanx again