Community of VE/MapPoint Users and Developers
This is a discussion on access Oracle db within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| access Oracle db 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) 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 |
| |||
|
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 |
| |||
|
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? |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Brazil: ERP Selection – Oracle, SAP, Microsoft | Andrew Karasev | News and Announcements | 1 | 10-31-2005 07:11 AM |
| Oracle Applications Customization, Integration, Reporting | Andrew Karasev | News and Announcements | 0 | 10-03-2005 05:44 PM |
| Microsoft CRM integration: Oracle database access from MSCRM | Anonymous | News and Announcements | 0 | 02-20-2005 05:51 PM |
| Using MapPoint with Oracle web application | Anonymous | MapPoint Web Service and Virtual Earth | 1 | 11-09-2004 02:02 PM |
| Connect to Oracle using UDL file | msotres | MapPoint 2006/2009 Discussion | 4 | 06-13-2004 09:31 PM |
Prague Flights
Aside from a good nightlife Prague has magnificent architecture from its industrial past. Book Prague flights for great value at Holiday Hypermarket.
Flights to Turkey
Find and book flights to Turkey. Travel Counsellors can help with travel to Turkey including flights and accommodation.
Holiday in Portugal
A holiday in Portugal is low cost but great value when you book with us online. Transportation and accommodation are excellent and very reasonable too.
Dominican Republic Holidays
Dominican Republic holidays have something to offer for everyone. From water sports, to sun bathing and more, enjoy a holiday there!
Cheap Holidays
Hunting for cheap holidays? Well save time by booking online with ulookubook.com and you can even check out our top tips to help you hunt down a bargain holiday.
Comparison Holidays
Travel.co.uk is a travel comparison service which makes it easy for you to find and plan the best holidays.
Cheap Holidays in Lanzarote
Now's the time to get up and go visit the Canary Islands! View cheap holidays in Lanzarote only at On The Beach.