string con = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\mobile.mdf;Integrated Security=True;User Instance=True"; SqlConnection sqlcon = new SqlConnection(); sqlcon.ConnectionString = con; SqlCommand cmd = new SqlCommand(); cmd.Connection = sqlcon; cmd.CommandText = "StoredProcedure1"; cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet dta = new DataSet(); da.Fill(dta); try { sqlcon.Open(); FormView1.DataSource = dta; FormView1.DataBind(); sqlcon.Close(); } catch { // }
ALTER PROCEDURE dbo.StoredProcedure1 as begin select * from tproduct end;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)