问题
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