Article View: borland.public.cppbuilder.database.ado
Article #873Call a function outside MS Access
From: Danid
Date: Tue, 05 Jul 2005 09:42
Date: Tue, 05 Jul 2005 09:42
27 lines
1834 bytes
1834 bytes
Hello,
The following message describe my problem posted by someone else in another newsgroup. I cannot not (yet) find any solution for it.
Using Access 2000 I have written a small VBA routine inside of standard module. I have also written a query that calls this routine to modify one of the columns in a table, ie. to strip punctuation characters from the column, eg.
select name, MyFunc([name])
from myTable
where name = "myname"
MyFunc is defined in Module1 as a function that currently returns its argument (will put in the stripping details later!), eg.
Public Function MyFunc(ByVal s As String) As String
MyFunc = s
End Function
This all works fine if I run the query within the Access environment.
However, if I try to execute the query from ADO (with BCB6)
I get the following error:
undefined function 'MyFunc'
So, is it actually possible to call a user-defined function from outside of the Access environment, and if so, how????
Any suggestions are appreciated!
Technical Details
Message-ID:
<42ca5615$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,78f65901373d9306,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Danid" <danid@nomail.com> Sender: "Danid" <danid@nomail.com> Reply-To: "Danid" <danid@nomail.com> Subject: Call a function outside MS Access Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 193.173.66.209 X-Forwarded-For: 172.21.155.55, 172.21.0.161 NNTP-Posting-Host: 207.105.83.66 Message-ID: <42ca5615$1@newsgroups.borland.com> Date: 5 Jul 2005 02:42:45 -0700 X-Trace: newsgroups.borland.com 1120556565 207.105.83.66 (5 Jul 2005 02:42:45 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail