Manish Gupta
Manish Gupta

Reputation: 459

C# export to excel from sql server

In my C# windows application, I am exporting sql server data to excel on remote drive. But it is too slow. However, if I export data to excel in the local drive, it is fast.

How can I increase the time if I want to export data to remote drive?

Thanks in advance...

Upvotes: 2

Views: 2053

Answers (2)

Chris Conway
Chris Conway

Reputation: 16529

Export to a temp folder on the local machine, copy it to the network and then delete the file from the temp folder. You could even do the copy and delete on a separate thread so the UI's not blocked.

Upvotes: 2

JonathanK
JonathanK

Reputation: 3040

If it is an option for you, export to the local drive and then copy/move the exported file to the remote drive.

Upvotes: 2

Related Questions