MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




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 2006/2009 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 ...


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 07-16-2003
Vincent BENNER's Avatar
Member
Yellow Belt
 
Join Date: Sep 2002
Posts: 41
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
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 07-16-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
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 07-16-2003
Vincent BENNER's Avatar
Member
Yellow Belt
 
Join Date: Sep 2002
Posts: 41
Thank you !



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

King regards,

Vincent BENNER
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 09-03-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
What is the ArArray in the code?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2004
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
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
dataset, linking, problem


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
linking points starbuck MapPoint 2006/2009 Discussion 2 01-09-2005 12:56 PM
Problem linking MApPoint DB2 - UDL Anonymous MapPoint 2006/2009 Discussion 0 10-08-2004 10:19 AM
Problem with dataset.QueryShape Method Ray Liu MapPoint 2006/2009 Discussion 1 07-15-2004 11:55 AM
problem with linking to access Anonymous MapPoint 2006/2009 Discussion 1 06-19-2003 06:32 PM
Linking a map to a map Anonymous MapPoint 2006/2009 Discussion 1 01-10-2003 12:21 PM


All times are GMT -5. The time now is 10:13 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