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 5 of 5

I've got a problem when linking a dataset !

This is a discussion on I've got a problem when linking a dataset ! within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I've created DataSet based on a requery witch is the following : Num_FDT (primary key), ADRESS, ZIPCODE, CITY When ...

  1. #1
    Vincent BENNER's Avatar
    Vincent BENNER is offline Member Yellow Belt
    Join Date
    Sep 2002
    Posts
    44

    I've got a problem when linking a dataset !

    Hello,

    I've created DataSet based on a requery witch is the following :
    Num_FDT (primary key), ADRESS, ZIPCODE, CITY

    When I display any of the matching pushpins, name of the
    pushpin is the STREET !

    Code:
        Dim objDS As MapPoint.DataSet
        Dim strXNC As String
        With Me.ctrlMP.ActiveMap.DataSets
            strcnx = gBDD_LOCAL & "!" & "ReqSQL"
            Set objDS = .LinkData(strcnx, "NUM_FDT", , geoCountryFrance, , geoImportAccessQuery)
            objDS.Symbol = 26
            arArray = Array(objDS.Fields(1), objDS.Fields(2), objDS.Fields(3), objDS.Fields(4))
            objDS.SetFieldsVisibleInBalloon arArray
        End With
    How to set the primary key in the pushpin's name ?

    It's very important because I've to use the .Find method...

    King regards,

    Vincent BENNER

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

    Use FieldOfArrays in LinkData

    You'll have to specify the optional [ArrayOfFields] parameter in LinkData before calling LinkData. Something like this in your case ...

    Dim objDS As MapPoint.DataSet
    Dim strXNC As String
    Dim myFieldArray(1 To 4, 1 To 2) As Variant
    With Me.ctrlMP.ActiveMap.DataSets
    strcnx = gBDD_LOCAL & "!" & "ReqSQL"

    myFieldArray(1, 1) = "NUM_FDT"
    myFieldArray(1, 2) = geoFieldName

    myFieldArray(2, 1) = "ADDRESS"
    myFieldArray(2, 2) = geoFieldAddress1

    myFieldArray(3, 1) = "ZIPCODE"
    myFieldArray(3, 2) = geoFieldPostal1

    myFieldArray(4, 1) = "CITY"
    myFieldArray(4, 2) = geoFieldCity

    Set objDS = .LinkData(strcnx, "NUM_FDT", myFieldArray, geoCountryFrance, , geoImportAccessQuery)

    objDS.Symbol = 26
    arArray = Array(objDS.Fields(1), objDS.Fields(2), objDS.Fields(3), objDS.Fields(4))
    objDS.SetFieldsVisibleInBalloon arArray
    End With

  3. #3
    Vincent BENNER's Avatar
    Vincent BENNER is offline Member Yellow Belt
    Join Date
    Sep 2002
    Posts
    44

    Thank you !



    Thank you very much for your help ! It's exactly what I need.

    King regards,

    Vincent BENNER

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    What is the ArArray in the code?

  5. #5
    TheJudge is offline Junior Member Yellow Belt
    Join Date
    Mar 2004
    Posts
    15
    How can i do the same thing in C#.. i just need to know how to create the Array as u did above please.

    Thank you very much and hope to hear from you asap

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. linking points
    By starbuck in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-09-2005, 11:56 AM
  2. Problem linking MApPoint DB2 - UDL
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 10-08-2004, 09:19 AM
  3. Problem with dataset.QueryShape Method
    By Ray Liu in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-15-2004, 10:55 AM
  4. problem with linking to access
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-19-2003, 05:32 PM
  5. Linking a map to a map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-10-2003, 11:21 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 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 56 57 58 59 60 61 62 63 64 65 66 67