AEP 中的数据表输出

发布于 2024-09-09 02:32:14 字数 80 浏览 4 评论 0原文

在 .Net AEP 中使用 DataTable 进行输出时,如何设置输出参数?使用什么数据类型?

谢谢,

霍华德

When using a DataTable for output in a .Net AEP, how do I set the Output Parameter? What data type is used?

Thanks,

Howard

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

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

发布评论

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

评论(1

青萝楚歌 2024-09-16 02:32:14

您是否想要按原样传回应用程序中使用的数据表,或者是否想要将数据表的等效项传回 AEP 用于返回结果集的 __output 表?

如果直接使用数据表,您可以设置 memo 类型的输出参数,然后将数据表的 XML 插入到 __output 中(您可能需要使用字符串编写器,这样就不必将其保存到文件中),

否则,AEP 将数据表的每一列需要有一个输出参数。类型应该相同(换句话说,如果您的数据表有 int、char、int,那么您的输出参数应该是 int、char、int)。
在 AEP 中,将数据表中的值插入到 __OUTPUT 表中。 (即将数据表添加到数据集中,创建数据适配器并使用 commandbuilder 创建插入命令,然后使用 dataadapter.update(dataset))

Are you wanting to just pass back the datatable as is to use in your application or are you wanting to pass back the equivalent of the datatable to the __output table the AEP uses to return the resultset?

If the datatable directly you could setup an output parameter of type memo and then insert into __output the XML of the datatable (you will probably need to use a stringwriter so you don't have to save it to a file)

Otherwise, the AEP will need to have one output parameter per column of your datatable. The types should be the same (in other words, if your datatable has int, char, int then your output parameters should be int, char, int).
In the AEP insert the values from your datatable into the __OUTPUT table. (i.e. add the datatable to a dataset, create a dataadapter and create the insert command using the commandbuilder then use dataadapter.update(dataset))

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