如何以编程方式更改 DataSet SqlCommand CommandText

发布于 2024-07-09 09:41:02 字数 215 浏览 7 评论 0原文

我有一个生成的数据集,其中包含一堆表。 在一张表中,我有一个自定义查询,用于选择 15 岁以上的人。 我想在工作程序期间更改此查询,以便查询看起来像“从年龄 > 的人中选择 *”。 17'。 现在看起来像“从年龄 > 的人中选择*” 15'。

我所知道的只是数据集中此查询的名称是什么。 这是 GetNotYoungPeople。 你能帮我解决这个问题吗?

I have a generated DataSet with bunch of tables. In one table I have a custom query that I use to select people that are older than 15 years. I would like to change this query during working program, so that the query will look like 'select * from people where age > 17'. Now it looks like 'select * from people where age > 15'.

All that I know is what is the name of this query in DataSet. It's GetNotYoungPeople. Could you please help me with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞慾 2024-07-16 09:41:02

它可能是 SQLDataAdaptor.SelectCommand

DataSet 由 SQLDataAdaptor 填充。 Fill 方法并且本身没有附加查询

It's probably part of a SQLDataAdaptor.SelectCommand

The DataSet is populated by the SQLDataAdaptor.Fill method and has no attached queries itself

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文