Hi there, i have a user defined function in my sql server so i can use from different pages. the question is, how do i call it from asp.net? can some one show me some code? and if u can, can u show me how to use it with data grid? thanks.
What does your UDF do? Does it return a Table value? You would treat the resultset the same way you would with any other table/stored procedure resultset. I think more information is needed here. Terri
I am not aware that you can call a UDF from ADO.NET directly. You can call a stored procedure, and so perhaps you will need to wrap your UDF call in a stored procedure. More information about what the UDF does (and what it is returning) will help.
my UDF returns a table, i have been reading some tutorials and books, and they say that "one of the advantages of using UDF is that it is possible to use it from many applications." however, i have been going nuts trying to find some help on how to code this.
if i cant use UDF, can i use stored procedures to retrive a table? i read that you can only update data with stored procedures, and that u get tables with UDF's.... thanks for your help guys.
You can absolutely return tables from a stored procedure, and you can certainly call a stored procedure from ADO.NET on an ASP.NET page.
This link should help explain how to do it.
elifer25
Member
15 Points
3 Posts
how to use UDF's with asp.net
Aug 21, 2003 03:45 PM|LINK
tmorton
All-Star
56441 Points
9720 Posts
ASPInsiders
Moderator
Re: how to use UDF's with asp.net
Aug 21, 2003 04:20 PM|LINK
ASP.NET/IIS.NET Website Manager, Neudesic
douglas.reil...
All-Star
23315 Points
4647 Posts
Re: how to use UDF's with asp.net
Aug 21, 2003 05:15 PM|LINK
Programming Microsoft Web Forms
My Blog
elifer25
Member
15 Points
3 Posts
Re: how to use UDF's with asp.net
Aug 21, 2003 05:35 PM|LINK
douglas.reil...
All-Star
23315 Points
4647 Posts
Re: how to use UDF's with asp.net
Aug 21, 2003 05:44 PM|LINK
Programming Microsoft Web Forms
My Blog
elifer25
Member
15 Points
3 Posts
Re: how to use UDF's with asp.net
Aug 21, 2003 06:03 PM|LINK
tmorton
All-Star
56441 Points
9720 Posts
ASPInsiders
Moderator
Re: how to use UDF's with asp.net
Aug 21, 2003 06:16 PM|LINK
ASP.NET/IIS.NET Website Manager, Neudesic
douglas.reil...
All-Star
23315 Points
4647 Posts
Re: how to use UDF's with asp.net
Aug 21, 2003 07:18 PM|LINK
Programming Microsoft Web Forms
My Blog
Phuoc
Participant
1150 Points
230 Posts
Re: how to use UDF's with asp.net
Aug 21, 2003 07:53 PM|LINK
and where there is a team, there is more than one way.
Uddhav Gark...
Member
14 Points
6 Posts
Re: how to use UDF's with asp.net
Mar 15, 2012 11:21 AM|LINK
Your link is not available.
please make it availabe.
Thanks in advance.