Question Creating a loop for multiple files coying to SQL Server which are coming from SFTP


New member
Dec 6, 2017
Programming Experience

I am new to C# code, I am trying to achieve copying the file from SFTP location to SQL Azure using SQL Bulk copy method. This I can achieve,but when I am trying to use foreach loop to read multiple files from SFTP file list I couldn’t able do it.

I can’t copy paste my code here, could some one out here help me out how can I achieve this specific to Azure DB ?

What exactly could you not achieve? A loop is simply a way to do something multiple times. If you already know how to do the something, there's no reason not to be able to do it multiple times. Please be more specific about the issue. That would include exactly how the actual behaviour differs from the desired behaviour, including error messages if there are any.

Also, unless you can provide a good reason that you can't post your code, I'm going to insist that you do - or at least a simplification containing the important parts - before I help further. Others may not feel the same way but I want to see an honest attempt first and I also want to see what's wrong with the way you did it so i can help correct your thinking, rather than simply providing a copy and paste solution.
Top Bottom