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

access Oracle db

This is a discussion on access Oracle db within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I am writing an application in VB 6.0. I have to plot information from an Oracle database on a ...

  1. #1
    Jade is offline Junior Member Yellow Belt
    Join Date
    Mar 2003
    Posts
    18

    access Oracle db

    Hello, I am writing an application in VB 6.0.
    I have to plot information from an Oracle database on a map.
    I' ve read that it is possible to do this with an udl-file, like this:

    Code:
     
    zDataSource = "\\mozart\vab\stagairs\VB\connectie.udl"
     Set pechgevalDataSet = mainMap.DataSets.ImportData(zDataSource, , geoCountryBelgium)
    I would like to know whether it is possible to access only one view.
    And if this is possible.. I also would like to know if it is possible to run SQL-statement from my VB-application.

    Would you be so kind to help me with a code-example. Any comments are more than welcome..

    Regards,

    Jade

  2. #2
    wgm01 is offline Junior Member White Belt
    Join Date
    Mar 2003
    Posts
    1
    I use VB6.0 to access an Oracle DB for mapping purposes, I cannot help you with the udl file, but I can show you an example of my code.

    I regularly use the datadesiger/connect objects to open a recordset. An example of my code is below (to use this code you must add and define your oracle database connection using a data designer named DataEnvironment1).

    Dim cnn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim objFindResults As MapPointCtl.FindResults
    Dim objPushpin As MapPointCtl.Pushpin
    Dim objMap As MapPointCtl.Map

    Set objMap = mapform.themap.ActiveMap

    '##### Open data connection to Oracle #####

    Set cnn = DataEnvironment1.Connection1

    If cnn.State = adStateClosed Then
    cnn.Open
    End If

    '##### Check if record currently exists in DB #####

    Set rs = New ADODB.Recordset

    rs.Source = "select * from main"
    Set rs.ActiveConnection = cnn
    rs.Open

    rs.MoveFirst
    Do Until rs.EOF

    Set objFindResults = objMap.FindAddressResults(rs!Address, _
    rs!City, , rs!State, rs!zipcode, geoCountryUnitedStates)

    If objFindResults.ResultsQuality = geoFirstResultGood Then
    Set objLoc = objFindResults.Item(1)
    end if

    Set objPushpin = objMap.AddPushpin(objLoc, _
    rs!Retailer_number & " " & _
    rs!Business_name)

    loop

    rs.Close
    cnn.Close

    Set cnn = Nothing
    Set rs = Nothing

  3. #3
    Jade is offline Junior Member Yellow Belt
    Join Date
    Mar 2003
    Posts
    18
    great!! just what I need!

    thank you very much!

    one question:

    "Set objFindResults = objMap.FindAddressResults(rs!Address, _ rs!City, , rs!State, rs!zipcode, geoCountryUnitedStates)"

    rs!Address : I suppose this is the column name of your tables?

  4. #4
    Jade is offline Junior Member Yellow Belt
    Join Date
    Mar 2003
    Posts
    18
    I tried the code, and it works, it only takes about 10 minutes to load 48 records..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Connect to Oracle using UDL file
    By msotres in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 02-01-2010, 02:28 AM
  2. Brazil: ERP Selection – Oracle, SAP, Microsoft
    By Andrew Karasev in forum News and Announcements
    Replies: 5
    Last Post: 06-02-2009, 05:11 PM
  3. Oracle Applications Customization, Integration, Reporting
    By Andrew Karasev in forum News and Announcements
    Replies: 0
    Last Post: 10-03-2005, 05:44 PM
  4. Microsoft CRM integration: Oracle database access from MSCRM
    By Anonymous in forum News and Announcements
    Replies: 0
    Last Post: 02-20-2005, 05:51 PM
  5. Using MapPoint with Oracle web application
    By Anonymous in forum Bing Maps and MapPoint Web Service
    Replies: 1
    Last Post: 11-09-2004, 02:02 PM

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