开发者

gridview to sql server database

开发者 https://www.devze.com 2023-01-31 20:09 出处:网络
is there any way to insert in bulk (i mean all gridview rows) to sql server database in single submit. its an ASP.Net app and I开发者_开发问答 also want to validate data.Have a look at using SqlBulkCo

is there any way to insert in bulk (i mean all gridview rows) to sql server database in single submit. its an ASP.Net app and I开发者_开发问答 also want to validate data.


Have a look at using SqlBulkCopy Class


In oracle we have batch insert for example

your query returns two rows with column name as a,b,c

a:b:c
1:2:3
4:5:5

you can use

insert into tab_name(a,b,c)(qry)
commit;

Make it dynamic and it should work.

0

精彩评论

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

关注公众号