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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a function defined in an Access DB from VB

Status
Not open for further replies.

jfw61

Programmer
May 15, 2003
1
TR
I have a set of functions defined in an Access database. Is it possible to use these functions in a VB application as follows...

Function TranslateIt will convert a character into some other string. If I use this SQL statement in Access it will run just fine - SELECT TranslateIT(myField) FROM tblWhatever.

But, when I try and use this statement to create an ADO Recordset I get the following error: "Undefined function 'TranslateIt' in expression.

I am attempting to do with an Access database what the DECODE function in Oracle does.

Thanks in advance for any ideas/help!
 
I have encountered the same problem. As far as I know, and I don't know much, you cannot use the Access defined functions outside of the Access application. If you wanted to fire up an Access application as an embedded OLE object it might work; but I would not go there.
After struggling with that problem for a few hours I bit the bullet and programmed the function into the VB application.
Good Luck
If someone comes up with a method of using the Access function wI will be very interested to see it!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top