Re: User Defined Functions



John, the Summary of the article you quotes says:
The Microsoft Jet 4.0 database engine permits you to call unsafe
Microsoft Visual Basic for Applications functions

The UDFs are VBA functions, not SQL functions.

AFAIK, JET SQL does not support CREATE FUNCTION.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<JohnCreighton_@xxxxxxxxxxx> wrote in message
news:1167472561.337950.11580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>From what I read
http://support.microsoft.com/kb/239482
Jet seems to support user-defined functions by I can't find any
examples on the web. I've found examples for other systems e.g.:

CREATE FUNCTION FROMPERSON (P PERSON)
RETURNS ROW (NAME VARCHAR(10), FIRSTNAME VARCHAR(10))
LANGUAGE SQL
CONTAINS SQL
NO EXTERNAL ACTION
DETERMINISTIC
RETURN VALUES (P..NAME, P..FIRSTNAME)
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0002426.htm

I've tried to use Jet stored procedures but I can't seem to execute
them as a function from within the query. I only seem to be able call
them as there own query. Could a parameterized query work? Is there a
way to pass parameters via the select statement?

.



Relevant Pages

  • Re: GROUP BY vs DISTINCT
    ... In Jet, the second query uses the same plan than MS SQL ... MS SQL Server uses 1 UET! ...
    (microsoft.public.access.queries)
  • Re: upsizing to sql 2005
    ... A query in Access-Jet will be started and under the supervision of Jet, ... Jet syntax parsing and evaluation. ... so, in this case, into MS SQL Server. ...
    (microsoft.public.access.queries)
  • Re: how do i get a query to work?
    ... > I need to know what a Query is, ... MS Access and JET are one such ... This is a key aspect of RDBMSes: The use of SQL to ask questions ... about data in Tables through the Database Manager. ...
    (microsoft.public.access.gettingstarted)
  • Re: Problem with OpenRecordSet
    ... I don't know your Query but let's say the SQL String is something like: ... The JET database engine which handles the processing of data including ... When you run a Query through the Access interface, ...
    (microsoft.public.access.formscoding)
  • Re: Linked MS SQL Server Tables
    ... then a SQL Stored Procedure. ... Stored Procedure easily won out. ... Remember that your query can refer to a table stored natively in Jet, ...
    (microsoft.public.access.queries)