When creating a public function in a module in a MS Access database, the function is available to call in local queries (running from inside MS Access). How can the function be called through ADO from an external application ? Is there a special syntax ?
hmmm...you could create a .DLL file...this way, you could create the function once, and then create a simple calling function in a module..*shrug*
I used to have documentation on how to do this, but only God knows where it is on my desk right now!
However, I do know that with C and C++, this problem is solved by creating custom header files (usually with the .h or .hpp extension), and using a '#include <(filename).(h or hpp)>.
If I do happen to find the document for DLL files, I'll place a post on here.
I don't believe you can call an access function directly from a non access program. If you explain the requirements of the ADO call, then maybe there are other alternatives available. For example, is the ADO from an ASP page. If it is from ASP, it would be easier to rewrite the function as an include file or a COM object.
Our application (written in VB and VC++) should work with different DBMSs, which have different SQL syntax and facilities. I think an elegant solution would be to have a layer of DBMS functions, to be used in the queries. For example, we could write some functions to replace MS Access function IIF with something less general but with the same syntax on MS Access and SQL Server.
If all DBMSs would be SQL ANSI 92 compliant, it would be much more simple .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.