I guess you need to do this:-
protected void gvDetails_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
SqlConnection con =new SqlConnection("@data source="connection"; initial catalog=database name; intigrated security=true");
con.open();
-------- Your Code-----------------
con.Close();
}