I have asp.net application to upload multiple pdf files to Sybase database. But it's time consuming to upload hundreds of them. What's the best way to go about this task? I can bring the docs on my local system first. So I can use windows application too for this o开发者_运维问答r any other option.....The time consuming part is clicking on browse button then selecting and then again browse button.....I want to have like check boxes against 800 documents that I want to save at one time.
If you can get them all in the same directory on your local machine you can use:
string[] filePaths = Directory.GetFiles(@"c:\MyDir\");
to get the list of all of the documents and then just use a for loop to grab each file and convert it to a byte stream and add it to the database. You would not even need a winforms application. A simple console application would do the trick.
精彩评论