asked on
.aspx code
=========
While i < dsPictures.Tables(0).Rows.Count
Dim newPicture As New MOMs_Image With {.PictureName = dsPictures.Tables(0).Rows(i)("PictureName"), .WorkOrderNo = dsPictures.Tables(0).Rows(i)("WorkOrderNo"), .IssueNo = dsPictures.Tables(0).Rows(i)("IssueNo"), .RoundName = dsPictures.Tables(0).Rows(i)("RoundName"), .OperativeName = dsPictures.Tables(0).Rows(i)("OperativeName"), .InChargeDate = dsPictures.Tables(0).Rows(i)("InChargeDate"), .LocationNo = dsPictures.Tables(0).Rows(i)("LocationNo"), .PanelNo = dsPictures.Tables(0).Rows(i)("PanelNo"), .WorkDate = dsPictures.Tables(0).Rows(i)("WorkDate"), .WorkTime = dsPictures.Tables(0).Rows(i)("WorkTime"), .DesignName = dsPictures.Tables(0).Rows(i)("DesignName"), .GPSLatitude = dsPictures.Tables(0).Rows(i)("GPSLatitude"), .GPSLongitude = dsPictures.Tables(0).Rows(i)("GPSLongitude"), .MOMSFeedback = dsPictures.Tables(0).Rows(i)("MOMSFeedback"), .PlanNum = dsPictures.Tables(0).Rows(i)("PlanNum"), .NameStreet = dsPictures.Tables(0).Rows(i)("NameStreet"), .Address1 = dsPictures.Tables(0).Rows(i)("Address1"), .Address2 = dsPictures.Tables(0).Rows(i)("Address2"), .City = dsPictures.Tables(0).Rows(i)("City"), .Country = sCountry}
pdc.MOMs_Images.InsertOnSubmit(newPicture)
If Exists(Server.MapPath("/temp/" & sCountry & "/" & dsPictures.Tables(0).Rows(i)("PictureName"))) Then
File.Move(Server.MapPath("/temp/" & sCountry & "/" & dsPictures.Tables(0).Rows(i)("PictureName")), Server.MapPath("/imported/" & sCountry & "/" & dsPictures.Tables(0).Rows(i)("PictureName")))
End If
i = i + 1
End While
pdc.SubmitChanges()
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
Building a list of items to insert into the db is more efficient then inserting one at a time.
Fernando
Open in new window