Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Displaying Mappoint 2001

This is a discussion on Displaying Mappoint 2001 within the MapPoint Desktop 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 ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    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

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Did you dim/set you mappoint objects?

    Are you sure the cboState.Text contains data?

    Set objLoc = objMap.Find("Rogers" & "," & cboState.Text)

  3. #3
    bigRahn is offline 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...)

  4. #4
    Bob Chase is offline Junior Member Yellow Belt
    Join Date
    Mar 2003
    Posts
    13

    .PrintOut shows data

    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can't get Mappoint 2001 to see my Magellan 315
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-24-2003, 08:06 AM
  2. Displaying Microsoft Streets 2002/2001 (.EST) files
    By lnarayan in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-19-2002, 01:13 PM
  3. I have Microsoft Mappoint 2001 and I am trying to ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-25-2001, 03:48 AM
  4. I am currently running Mappoint 2001 and will buy ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-19-2001, 08:49 AM
  5. Actually, my question is regarding MapPoint 2001 w....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-06-2000, 08:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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