Hi Friends
How i can call sql data base function from my ASP.NET front end?
Sql Data Base function
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pravin MoreRank #1,419 · 1.2K reputationPosted Dec 6, 2011, 6:49 PM EST
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 TeotiaRank #603 · 4K reputationPosted Dec 7, 2011, 7:02 AM EST