|
-
Feb 3rd, 2009, 10:27 PM
#3
Fanatic Member
Re: [3.0/LINQ] How would you imporve this
If it is a 200mb file, it'll take some time.
You can use a backgroundworker (or a thread), to run the process in the background. You could then invoke delegate methods to update the UI to let the user know what is going on, and give them an option to cancel (obviously you'd need to switch to a Windows app instead).
A count through SQL would very likely be faster than opening the file, reading through the entire thing and then telling someone what the count is. The only drawback is the time that it would take SQL to import the file.
Warren Ayen
Senior C# Developer
DLS Software Studios ( http://www.dlssoftwarestudios.com/)
I use Microsoft Visual Studio 2005, 2008, working with Visual Basic and Visual C#
Hey! If you like my post, or I solve your issue, please Rate Me!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|