| Author: ABitSmart 07 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Try it this way,
protected void Button1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); string query = "SELECT dbo.whichContinent('France')"; cmd=new SqlCommand (query ,conn ) ; conn.Open(); dr = cmd.ExecuteReader(); string continentName = dr["Continent"].ToString (); conn.Close (); }
Kind regards, ABitSmart DNS Web-master, DNS MVM My blog Thoughts.exe
|
| Author: Bunty 08 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hi,
You have call the function incorrectly,so it is giving function.
Modify the below statement string query = "SELECT * FROM dbo.whichContinent('France')";
To string query = "SELECT dbo.whichContinent('France')";
Now execute the your modify code.
Thanks & Regards S.S.Bajoria
|