Hi Friends
How i can call sql data base function from my ASP.NET front end?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pravin MorePosted Dec 6, 2011, 11:49 PM
you can call it same way like query.
here is code to call it....
suppose fTestFunction() is your function name......
SqlDataReader dr;
SqlCommand spcmd;
SqlConnection spcon=new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["commonconnection"].ToString())
spcon.Open();
spcmd = new SqlCommand("select * from fTestFunction() ", spcon);
dr = spcmd.ExecuteReader();
if your function have any parameter then you can pass it in bracket.
Thanks,
Pravin.
Akshay TeotiaPosted Dec 7, 2011, 12:02 PM