TableAdapter生成的Insert方法中的参数名称丢失 [英] Lost parameter names in TableAdapter generated Insert method

查看:104
本文介绍了TableAdapter生成的Insert方法中的参数名称丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

这里Name是一个字符串,另一个是整数. 但是,生成的签名看起来像这样:

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.

这怎么会发生? 如果决定手动更改Parameter2,如何确定它是StatusID?

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

推荐答案

查看代码(xml),根据代码进行更改(在数据集中打开xml模式,然后在此处进行操作).您可以将其名称更改为任意名称.

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.

这篇关于TableAdapter生成的Insert方法中的参数名称丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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