For Each f As DataRow In ds.Tables(0).Rows
If filas < ds.Tables(0).Rows.Count - 1 Then
Comm.CommandText = "INSERT INTO [NSO].[dbo].[Audited_Facts_regular]([Fecha_Carga],[CountryID],[ContryName],[StoreID],[NSO_StoreID],[StoreName] " & _
" ,[StoreAddres] ,[StoreStatud],[StoreComments],[StoreStarDateTime],[StoreEndDateTime],[StoreClosing]" & _
" ,[PlannetAudit],[AuditInstructionID],[SyneryMode],[IMDB_ProductID],[NSO_ProductID],[ProductName]" & _
" ,[ProductCategory],[Barcode],[ProductLevel],[ProductComment],[LocationID],[LocationName],[LocationComments]" & _
" ,[ExhibitionID],[ExhibitionName],[ExhibitionLevel],[ExhibitionPossition],[ExhibitionComment],[VariableID]" & _
" ,[VariableName],[VariableAtribute],[VariableValue],[VariableComments],[FactType],[ReUser])" & _
" VALUES(" & String.Format("{0:dd-MM-yyyy}", DateTime.Now.Date) & ",@CountryID,@ContryName,@StoreID,@NSO_StoreID,@StoreName " & _
" ,@StoreAddres ,@StoreStatud,@StoreComments,@StoreStarDateTime,@StoreEndDateTime,@StoreClosing" & _
" ,@PlannetAudit,@AuditInstructionID,@SyneryMode,@IMDB_ProductID,@NSO_ProductID,@ProductName" & _
" ,@ProductCategory,@Barcode,@ProductLevel,@ProductComment,@LocationID,@LocationName,@LocationComments" & _
" ,@ExhibitionID,@ExhibitionName,@ExhibitionLevel,@ExhibitionPossition,@ExhibitionComment,@VariableID" & _
" ,@VariableName,@VariableAtribute,@VariableValue,@VariableComments,@FactType,@ReUser)"
'Comm.Parameters.AddWithValue("@Fecha12", String.Format("{0:dd-MM-yyyy}", DateTime.Now.Date))
Comm.Parameters.AddWithValue("@CountryID", f(0).ToString())
Comm.Parameters.AddWithValue("@ContryName", f(1).ToString())
Comm.Parameters.AddWithValue("@StoreID", f(2).ToString())
Comm.Parameters.AddWithValue("@NSO_StoreID", f(3).ToString())
Comm.Parameters.AddWithValue("@StoreName", f(4).ToString())
Comm.Parameters.AddWithValue("@StoreAddres", f(5).ToString())
Comm.Parameters.AddWithValue("@StoreStatud", f(6).ToString())
Comm.Parameters.AddWithValue("@StoreComments", f(7).ToString())
Comm.Parameters.AddWithValue("@StoreStarDateTime", f(8).ToString())
Comm.Parameters.AddWithValue("@StoreEndDateTime", f(9).ToString())
Comm.Parameters.AddWithValue("@StoreClosing", f(10).ToString())
Comm.Parameters.AddWithValue("@PlannetAudit", f(11).ToString())
Comm.Parameters.AddWithValue("@AuditInstructionID", f(12).ToString())
Comm.Parameters.AddWithValue("@SyneryMode", f(13).ToString())
Comm.Parameters.AddWithValue("@IMDB_ProductID", f(14).ToString())
Comm.Parameters.AddWithValue("@NSO_ProductID", f(15).ToString())
Comm.Parameters.AddWithValue("@ProductName", f(16).ToString())
Comm.Parameters.AddWithValue("@ProductCategory", f(17).ToString())
Comm.Parameters.AddWithValue("@Barcode", f(18).ToString())
Comm.Parameters.AddWithValue("@ProductLevel", f(19).ToString())
Comm.Parameters.AddWithValue("@ProductComment", f(20).ToString())
Comm.Parameters.AddWithValue("@LocationID", f(21).ToString())
Comm.Parameters.AddWithValue("@LocationName", f(22).ToString())
Comm.Parameters.AddWithValue("@LocationComments", f(23).ToString())
Comm.Parameters.AddWithValue("@ExhibitionID", f(24).ToString())
Comm.Parameters.AddWithValue("@ExhibitionName", f(26).ToString())
Comm.Parameters.AddWithValue("@ExhibitionLevel", f(26).ToString())
Comm.Parameters.AddWithValue("@ExhibitionPossition", f(27).ToString())
Comm.Parameters.AddWithValue("@ExhibitionComment", f(28).ToString())
Comm.Parameters.AddWithValue("@VariableID", f(29).ToString())
Comm.Parameters.AddWithValue("@VariableName", f(30).ToString())
Comm.Parameters.AddWithValue("@VariableAtribute", f(31).ToString())
Comm.Parameters.AddWithValue("@VariableValue", f(32).ToString())
Comm.Parameters.AddWithValue("@VariableComments", f(33).ToString())
Comm.Parameters.AddWithValue("@FactType", f(34).ToString())
Comm.Parameters.AddWithValue("@ReUser", f(35).ToString())
Comm.Connection = Cone
next