【问题标题】:Lost parameter names in TableAdapter generated Insert methodTableAdapter 生成的 Insert 方法中丢失了参数名称
【发布时间】:2010-11-22 10:05:40
【问题描述】:

我正在尝试在 TableAdapter 中使用类似查询的 Insert 方法生成

INSERT INTO Status
                  (ScheduleID, StatusID, Name, Color)
VALUES     (?, ?, ?, ?)

这里 Name 是一个字符串,另一个是整数。 然而,生成的签名如下所示:

InsertQuery(int Color, string Param2, string Param3, string Param4)

与查询不匹配,无论是名称还是参数类型的顺序。

怎么会这样? 如果我决定手动更改,如何确定 Parameter2 是 StatusID?

【问题讨论】:

    标签: c# visual-studio-2008 tableadapter generated-code


    【解决方案1】:

    查看代码(xml),根据它更改它们(打开数据集的 xml 架构并在那里执行)。你可以把他们的名字改成你喜欢的任何名字。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-14
      • 1970-01-01
      • 2017-02-23
      • 2015-10-21
      • 1970-01-01
      • 2022-10-24
      • 1970-01-01
      相关资源
      最近更新 更多