MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




access Oracle db

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-14-2003
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
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 04-22-2003
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
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 04-23-2003
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?
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 04-25-2003
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..
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


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


All times are GMT -5. The time now is 01:29 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

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.


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