MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Displaying Mappoint 2001

This is a discussion on Displaying Mappoint 2001 within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am a rookie looking to display Mappoint data from a SQL Database. Funny thing is, I know how to ...


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 04-01-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Displaying Mappoint 2001

I am a rookie looking to display Mappoint data from a SQL Database. Funny thing is, I know how to input all the records using the mappoint object, but I cannot see them! I know they are there because when I execute a .printout method, I see the data, but for some reason I am not displaying the records on my control. I could have sworn a friend used an image control or something other than the *.ocx (which I do not believe is on my machine.) Any help would be appreciated.

Here's my code: also, my mappoint control is named mpNA for "North America". ELR

PS I do realize I've commented out the while / wend. I just wanted to map one object and then see it for now. I will worry about mapping all the records as soon as I figure this out. ELR

PLEASE EMAIL ME AT ELIAS.RODRIGUEZ@MINDSPRING.COM

Private Sub cmdSearch_Click()
Dim cn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cn = New ADODB.Connection

cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MLS;Data Source=192.168.1.101;Password=.saile"
cn.Open
Set rst = New ADODB.Recordset
rst.Open "select * " & _
"from idxarkmls1 " & _
"where town='" & txtCity.Text & " " & cboState.Text & "'", cn
'While Not rst.EOF
Set objLoc = objMap.Find("Rogers" & "," & cboState.Text)
objLoc.GoTo

'// Create a new pushpin
Set objPushPin = objMap.AddPushpin(objLoc, strLocationText)

'// Display the balloon
objPushPin.BalloonState = geoDisplayBalloon

'// Change pushpin symbol to one of the standard symbols
'// 26 is a yellow circle
objPushPin.Symbol = 26

objPushPin.Highlight = True
objPushPin.Note = "This is the address you selected!"

rst.MoveNext
'Wend
'objMap.PrintOut
rst.Close
cn.Close
Set rst = Nothing
Set cn = Nothing
End Sub
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 04-02-2003
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Did you dim/set you mappoint objects?

Are you sure the cboState.Text contains data?

Quote:
Set objLoc = objMap.Find("Rogers" & "," & cboState.Text)
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-02-2003
Member
Yellow Belt
 
Join Date: Oct 2002
Posts: 46
Following John's approach

You've probably done this already, but it may be worth while to look at the results you SQL statement and then manually search for some of the locations.
(I.e. do what you want be hand to simulate how the code is working.)

I see in your code, you're not checking to make sure the recordset is populated.
I'd add something like
if not (rs.eof and rs.bof) then 'this makes sure the recordset isn't empty
rs.movefirst
'insert loop here...
...what you have ...
end if


(I didn't see strLocationText = "...", so I assume you removed that from the snip...)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-03-2003
Junior Member
Yellow Belt
 
Join Date: Mar 2003
Posts: 12
.PrintOut shows data

Quote:
I know they are there because when I execute a .printout method, I see the data
Do you mean that objMap.printout results is a printed map showing the PushPins, but that you cannot see them on the control?
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
2001, displaying, mappoint


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
Can't get Mappoint 2001 to see my Magellan 315 Anonymous MapPoint 2006/2009 Discussion 0 04-24-2003 09:06 AM
Displaying Microsoft Streets 2002/2001 (.EST) files lnarayan MapPoint 2006/2009 Discussion 0 12-19-2002 02:13 PM
I have Microsoft Mappoint 2001 and I am trying to .... Anonymous MapPoint 2006/2009 Discussion 1 09-25-2001 04:48 AM
I am currently running Mappoint 2001 and will buy .... Anonymous MapPoint 2006/2009 Discussion 1 09-19-2001 09:49 AM
Actually, my question is regarding MapPoint 2001 w.... Anonymous MapPoint 2006/2009 Discussion 1 11-06-2000 09:46 AM


All times are GMT -5. The time now is 12:24 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 55