Community of MapPoint and Virtual Earth 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 a ...
| |||||||
| Today's Posts | Twitter Feed | 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? |
![]() |
| Tags |
| access, oracle |
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 | 5 | 4 Weeks Ago 05:11 PM |
| 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 |
Hurghada Holiday
Enjoy sunny Egypt when you book a Hurghada holiday through UlookUbook at a good price!