Hi! Vandam
check this site
www.w3schools.com go to chmpdf.com and download e-book of SQL server
or
here is the sample code:
//stored procedure with parameters
protected void btnParameter_Click(object sender, EventArgs e)
{
string constring = "Data Source=UTTAM;Initial Catalog=Ship;Integrated Security=True";
SqlConnection con = new SqlConnection(constring);
int phon=0;
try
{
con.Open();
SqlCommand command = new SqlCommand();
command.Connection = con;
command.CommandText = "sp_getByPhone";
command.CommandType = CommandType.StoredProcedure;
SqlParameter param = command.Parameters.AddWithValue("@Phone", TextBox1.Text);
param.Direction = ParameterDirection.Input;
param.DbType = DbType.Int32;
SqlDataAdapter adaptor = new SqlDataAdapter();
adaptor.SelectCommand = command;
DataSet data = new DataSet();
adaptor.Fill(data, "Shippers");
DataTable table = data.Tables["Shippers"];
GridView2.DataSource = table;
GridView2.DataBind();
}
finally
{
con.Close();
}
}