Calling an Access query containing function from VB

G

Guest

Hi all

I have a query in Microsoft Access that uses a function. When I call this query from VB, I get an error message that the function is undefined. I can run query in Access with no problem and see the resultset
Any suggestion
Thanks in advanc

Ray
 
D

Douglas J. Steele

The problem is that when you query the data from outside of Access, your
only connection to the MDB is through the Jet Engine, and the Jet Engine
doesn't know about user-defined functions (nor, for that matter, about all
of the functions Access knows about)

I've heard that you might be able to do it using Automation, but can't
confirm this. However, note that Automation would require that you have
Access installed on each workstation where the application is used.

You're going to have to bring the recordset back to VB, and then apply the
function to it.


--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Ray said:
Hi all,

I have a query in Microsoft Access that uses a function. When I call this
query from VB, I get an error message that the function is undefined. I can
run query in Access with no problem and see the resultset.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top