开发者

How to save multiple column in database

开发者 https://www.devze.com 2022-12-30 15:59 出处:网络
I have a text file.I need to get data from this text file and show on grid , 1)After this开发者_开发百科 user can update informationfrom gridview,

I have a text file.I need to get data from this text file and show on grid ,

1)After this开发者_开发百科 user can update information  from gridview, 
2)Click on save button save data on database.

Before clicking on button data don't save on database.How to do that?


"In my text file, I have more than 1000 rows, how to save them in temp database? I want to save them by using stored procedure, how to save multiple bits of data by executing one procedure?"

You can use SqlClient.SqlBulkCopy class for this.

The textfile can be the source for the bulk copy:

http://blog.stevienova.com/2008/01/16/net-fastest-way-to-load-text-file-to-sql-sqlbulkcopy/

0

精彩评论

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

关注公众号