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

problem with IMPORT-method

This is a discussion on problem with IMPORT-method within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hallo guys, i got a serious problem while importing data using vba (com-object). import without the parameter ArryOfFields works fine. ...

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

    problem with IMPORT-method

    Hallo guys,

    i got a serious problem while importing data using vba
    (com-object). import without the parameter ArryOfFields
    works fine. any ideas ?

    thanks in advance.

    mark
    (mark.pfizenmayer@web.de)

    Code
    ====

    Public objDataSets As MapPointCtl.DataSets
    Public objDataSet As MapPointCtl.DataSet

    .
    .
    .

    Public Sub procDatenImport(sDateiname As String, _
    sKennzahlName As String, _
    sFeld() As String, _
    iFeldTyp() As Integer, _
    iDarstellungstyp As Integer)
    Dim varFeld()
    Dim iAnz As Integer
    Dim iLoop As Integer


    iAnz = UBound(sFeld)
    iAnz = 1
    ReDim varFeld(iAnz, 2)

    For iLoop = 1 To iAnz
    varFeld(iLoop, 1) = sFeld(iLoop) 'Fieldname
    varFeld(iLoop, 2) = iFeldTyp(iLoop) 'geoField...
    Next iLoop

    Set objDataSets = mapKarte.ActiveMap.DataSets


    ' at this method i got the message "incorrect parameter" (german: "falscher parameter")
    Set objDataSet = objDataSets.ImportData(sDateiname, varFeld(), geoCountryGermany, geoDelimiterTab, geoImportFirstRowIsHeadings)

    .
    .
    .

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

    solution

    Solution ...


    >For iLoop = 1 To iAnz
    > varFeld(iLoop, 1) = sFeld(iLoop) 'Fieldname
    > varFeld(iLoop, 2) = iFeldTyp(iLoop) 'geoField...
    => wrong: iFeldTyp = Integer
    => right: iFeldTyp = Variant/Long
    >Next iLoop

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem with dataset.QueryShape Method
    By Ray Liu in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-15-2004, 10:55 AM
  2. import query with importdata method in VB.net
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-20-2004, 10:30 AM
  3. Problem method Map.copymap() in visual basic .net
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-28-2003, 02:05 AM
  4. Problem with the optermise method
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-14-2003, 09:06 AM
  5. Import method
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-28-2003, 03:41 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83