Hello,
My application allows the user to upload a csv file. Once the file is uploaded I need to add two columns to is (FileName and UploadDate) for each record in the row. That data table will then do a data dump into a temp table using sqlBulkCopy.
My question is that where in my loop statements would I add my FileName and UploadDate so that it is added to the beginning of each record/row.
Protected Sub btUpload(sender As Object, e As EventArgs)
Dim FileUtilities As New FileUtilities
Dim fileExt As String = System.IO.Path.GetExtension(fu1.FileName)
Dim FileName = fu1.FileName
Dim DateUpload As DateTime = System.DateTime.Now
If fu1.HasFile Then
If Not fileExt = ".csv" Then
lblWrongExtention.visible = True
Else
Dim csvPath As String = System.IO.Path.GetFullPath(fu1.PostedFile.FileName)
fu1 ...
Go to the complete details ...