Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Displaying Mappoint 2001 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 |
| ||||
|
Did you dim/set you mappoint objects? Are you sure the cboState.Text contains data? Quote:
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
| 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...) |
| |||
| .PrintOut shows data Quote:
|
![]() |
| Tags |
| 2001, displaying, mappoint |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |