2
Answers

SqlCommandBuilder didnt take dataAdapter as an arguement

Gaurav Singh

Gaurav Singh

9y
506
1
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)