Click here to Skip to main content
15,913,486 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have grideview that grideview has 100000 records i want to save in database that 100000 records in one button click event. when i will click that button at that time
my project hang.
Posted

try Bulk Insert concept

following link of bulk insert

http://www.c-sharpcorner.com/forums/thread/151831/bulk-insert-from-gridview-to-database.aspx[^]

http://forums.asp.net/t/1746258.aspx/1[^]

hope will be help you

Thanks
 
Share this answer
 
What code are you using to save the records to the database, one big query or 100.000 separate ones?
If it's the second option, the solution is to rewrite the code to use 1 big query.

If this doesn't help please post some more details on your code and setup, and we can try work out a solution.
 
Share this answer
 
chinmaya,

Please submit the code you are using.

Before that try to increase the time out.

Append the below code with your connection string

;Connection Timeout=<<time in secs>>

to increase the timeout.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900