shamim
shamim

Reputation: 6768

How to save multiple column in database

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?

Upvotes: 1

Views: 400

Answers (1)

Tim Schmelter
Tim Schmelter

Reputation: 460108

"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/

Upvotes: 1

Related Questions