简体   繁体   中英

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 be 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

作为数据集的CRUD操作一部分的插入语句仅适用于表X。您必须编写自定义插入语句才能插入表y。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM