Lost parameter names in TableAdapter generated Insert method

﹥>﹥吖頭↗ 提交于 2019-12-13 06:43:45

问题


I'm trying to generate a Insert method in a TableAdapter with a query like

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

Here Name is a string and the other are integers. The generated signature however looks like this:

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

Which does not match the query, either in name or order of parameter types.

How can this happen? How can I be sure that Parameter2 is StatusID if I decide to change it manually?


回答1:


See the code(xml), change them according to it(open xml schema of your dataset and do that there). You can change their names to whatever you like.



来源:https://stackoverflow.com/questions/4244255/lost-parameter-names-in-tableadapter-generated-insert-method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!