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.
精彩评论