Gaurav Singh

Gaurav Singh

  • NA
  • 0
  • 25.5k

SqlCommandBuilder didnt take dataAdapter as an arguement

Apr 30 2015 8:11 PM
I got this error message with squiggly line under new SqlCommandBuilder(da);


Error Description:

Error1'ProgressiveSchool.SqlCommandBuilder' does not contain a constructor that takes 1 arguments

My code:
protected void btnUpload_Click(object sender, EventArgs e)
{
string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
using (SqlConnection con = new SqlConnection(CS))
{
SqlDataAdapter da = new SqlDataAdapter((string)ViewState["Sql_Query"],con);
SqlCommandBuilder builder = new SqlCommandBuilder(da);
.....................................................................................................


please help me where i have done mistake, considering the fact i am beginner to dot net

Answers (2)