View Full Version : USer Defined Function and Backend View


Endgame
12-07-2007, 07:18 AM
To all who see these presents, Greeting!

I have an Access FE and an SQL BE. One of my forms shows a concatenation of a one-to-many relationship. I wrote a function which pulls the one-to-many data and performs the concatentation in the front end. Problem is that I have a small pipe connecting the FE and BE so the concatenation is slow.

I created my concatenation function in a module on the BE but was unable have my 'View' utilize it the way I do in my Access front end query. My thought was to 1) create the function in a module on the BE2)create a 'View' on the BE that produces my key index and concatenated 1-M relationship 3)link the 'View' to my FE.

The function compiles with no ERMs. However, I get the following ERM when I try to create and save my 'View':
ADOerror: 'fConcatenateLink' is not a recognised function name

My 'View' SQL is:
SELECT LinkIdx, fConcatenateLink(LinkIdx) AS EXPR1
FROM dbo.Link

Thoughts on why the View can not recognise the function?

Regards,
Endgame

boblarson
12-12-2007, 10:38 PM
Backends should ONLY contain TABLES - No code, no forms, etc. Having those in there will heighten your chances for corruption.

Your function should be in the front end.