473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calling a function built in access in a query to Oracle through ODBC

I am trying to calculate distance from a point entered by a user usng
a function in Access in a query that calls tables in an Oracle
database as well as in Access. I am getting the following message:

Undefined function 'Distance' in expression.

Here is the query:

SELECT people.first_name
, jobs.job
, job_types.job_type_description
, Distance(DLookUp("latitude","ZIP_CODES","zip = " &
[Forms]![testform]![Combo4]),DLookUp("longitude","ZIP_CODES","zip = "
& [Forms]![testform]![Combo4]),[addresses]![LATITUDE],[addresses]![LONGITUDE],True)
AS Miles
FROM (job_types INNER JOIN (people INNER JOIN jobs ON people.people_id
= jobs.people_id) ON job_types.job_type = jobs.job_type) INNER JOIN
addresses ON people.people_id = addresses.people_id
WHERE (((specialty_mapping.panel_specialty)=[Forms]![testform]![Combo0]));

OK, so the table names have been changed, but here's where each
resides:
people - Oracle
jobs - Oracle
addresses - Oracle
job_types - Access
zip_codes - Oracle

Also, the function I am using (Distance) does work, and is a Public
Function in the database.

Any ideas?

Thanks!
Nov 12 '05 #1
1 2153
DFS
Looks like your latitude and longitude arguments aren't syntaxed correctly.
Also I see you're referencing Zip Codes using a number syntax. Zip Codes
should be stored and used as if they were text, because some start with 0.

Try:

Distance(
DLookUp("latitude","ZIP_CODES","zip = '" & [Forms]![testform]![Combo4] &
"'"),
DLookUp("longitude","ZIP_CODES","zip = '" & [Forms]![testform]![Combo4] &
"'"),
[addresses]![LATITUDE],
[addresses]![LONGITUDE],
True)
AS Miles
"Peter Monica" <pe**********@concentra.com> wrote in message
news:42************************@posting.google.com ...
I am trying to calculate distance from a point entered by a user usng
a function in Access in a query that calls tables in an Oracle
database as well as in Access. I am getting the following message:

Undefined function 'Distance' in expression.

Here is the query:

SELECT people.first_name
, jobs.job
, job_types.job_type_description
, Distance(DLookUp("latitude","ZIP_CODES","zip = " &
[Forms]![testform]![Combo4]),DLookUp("longitude","ZIP_CODES","zip = "
& [Forms]![testform]![Combo4]),[addresses]![LATITUDE],[addresses]![LONGITUDE],
True) AS Miles
FROM (job_types INNER JOIN (people INNER JOIN jobs ON people.people_id
= jobs.people_id) ON job_types.job_type = jobs.job_type) INNER JOIN
addresses ON people.people_id = addresses.people_id
WHERE (((specialty_mapping.panel_specialty)=[Forms]![testform]![Combo0]));

OK, so the table names have been changed, but here's where each
resides:
people - Oracle
jobs - Oracle
addresses - Oracle
job_types - Access
zip_codes - Oracle

Also, the function I am using (Distance) does work, and is a Public
Function in the database.

Any ideas?

Thanks!

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jhweb | last post by:
I am trying to query a table in oracle from Access 2000 using the following criteria. select * from table1 where DATE_RECEIVED between '1/jan/2003' and '30/jun/2003' I am using the Oracle...
8
by: Alfonso Esteban Gonzalez Sencion | last post by:
I am trying to use Access as a front end for extracting information from an Oracle database. I started using linked tables but I am getting a very curious behaviour. When I consult the linked...
2
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
12
by: zwasdl | last post by:
Hi, I'm using MS Access to query against Oracle DB via ODBC. Is it possible to use HINT in Access? Thanks, Wei
16
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild...
10
by: WannaKatana | last post by:
I am just wondering why, with nothing else running and executing an update query against a very large table, does Access seem to be causing less than 10% processor usage. Then it says "There is not...
8
by: colmkav | last post by:
Can someone tell me how I can access the return value of a function called from Oracle as opposed to a store proc from oracle? my oracle function is get_num_dates_varposfile. I am only used to...
23
by: Gloops | last post by:
Hello everybody, Is anyone able to give me some indications about how to develop an Access interface for an Oracle database ? I dispose of Access 2003 (11.6566.8107) SP2, Oracle 9i 9.2.0.1.0...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.