SqlCommandBuilder构造函数没有采取争论 - DataAdapter争论? [英] SqlCommandBuilder Constructor didn't take arguement - DataAdapter arguement?

查看:74
本文介绍了SqlCommandBuilder构造函数没有采取争论 - DataAdapter争论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码:



SqlDataAdapter da = new SqlDataAdapter((string)ViewState [Sql_Query],con);

SqlCommandBuilder builder = new SqlCommandBuilder(da);





错误描述:



错误1'ProgressiveSchool.SqlCommandBuilder'不包含带有1个参数的构造函数







寻求帮助..

My code:

SqlDataAdapter da = new SqlDataAdapter((string)ViewState["Sql_Query"],con);
SqlCommandBuilder builder = new SqlCommandBuilder(da);


Error Description:

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



Looking for Help..

推荐答案

您的 SqlCommandBuilder 代码显示没有定义构造函数。这意味着只有默认的无参数构造函数。因此,您无法调用不存在的构造函数 new SqlCommandBuilder(da)



这就是全部。就这么简单。



-SA
Your SqlCommandBuilder code shows that there is no constructor defined. It means that there is only the default, parameterless constructor. Therefore, you cannot call the non-existing constructor new SqlCommandBuilder(da).

That's all. As simple as that.

—SA


这篇关于SqlCommandBuilder构造函数没有采取争论 - DataAdapter争论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆