开发者

dataset won't insert

I am trying to batch insert into a sql server table(TableX) with data from a dataset or datatable that was filled from a different sql table(TableY). The tables are identical in structure. I get no errors at all. TableY just doesn't get inserted into. I can fill a datatable with TableX, add a row and insert back into TableX and it works. It seems that if the data comes from a different database table it doesn't work. Could it be the schema info in the datatable that is causing this? I am only using SQL server tables as a test. It will eventually b开发者_开发技巧e between oracle and sql server. Possibly other variations.

TableX----->Datatable----->Modify data-----Insert Into----->TableX: Works

TableX----->Datatable----->Modify data-----Insert Into----->TableY: Doesn't Work


Your insert statements that are part of the CRUD operations for the data set only apply to Table X. You have to write custom insert statements to insert into Table y.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜