Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a public function through ADO

Status
Not open for further replies.

aliviu

Programmer
Feb 27, 2002
4
0
0
RO
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! :p

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.

Greg Tammi, ATS Alarm Supervisor
 
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 :).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top