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