Originariamente inviato da Roby_72
Ma tu sei dentro ad un Loop???
E dov'è???
Roby
Questa è la parte di code in questione:
codice:
Dim DestinationFileName
DestinationFileName = DestinationPath & FileField.FileName
Dim Conn, RS, oRs, contRighe
DestinationFileName = "UploadFolder/" & Form("File1").FileName
Set Conn = GetConnection
Set RS = Server.CreateObject("ADODB.Recordset")
Set oRs = Server.CreateObject("ADODB.Recordset")
oRS.Open "ListFiles", GetConnection, 2, 2
Rs.Open "SELECT * from [DATI$]", "DRIVER=Microsoft Excel Driver (*.xls); DBQ=" & Server.MapPath(DestinationFileName)
contRighe = 1
If Rs("ABC") <> "" and contRighe > 1 Then
oRS.AddNew
oRs("ID") = Rs("ID")
oRs("ABC") = Rs("ABC")
oRs("DEF") = Rs("DEF")
oRs.Update
contRighe = contRighe + 1
else
Response.write "
<center>Problema di importazione nel file excel selezionato alla riga "& contRighe &"!" & "
"
exit do
end if
Rs.MoveNext
Loop
if rs.eof Then
Response.Write "La procedura ha avuto esito Positivo ! " & "
"
End if
end if
Next
.......