Groups | Blog | Home
all groups > vb.net data > april 2007 >

vb.net data : TableAdapter how to write and call a custom function in visual bas


Ed Warren
4/27/2007 9:02:11 AM
Problem. I have a microsoft access database with a number of tables/columns.
I need to have a tableadapter that combines a number of fields into one
field.

Something like:
Select [tableID], [ClientName] as Name, CustomFunction(val1,val2,val3) as
Notes
from TAble1


Then in Visual basic I want to write the customFunction

Public Function CustomFunction(byval var1, byval var2, byval var3) as string
dim strResults
strResults = (some processing on the passed variables)

return strResults

end function
--

Is there a way to do this with elegence? the only way I have figured out is
to generate a dataset then go row by row and do the processing.


RobinS
4/30/2007 11:43:40 PM
If you mean that the CustomFunction is in your Access database, then no,
you can't do this.

Robin S.
------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button