Allora, ho tentato con questa mandrakata. Dal momento che tutti i campi data sono comunque obbligatori, mi bastava che il campo anest potesse essere vuoto e ci sono riuscito con un if e cioè se è nullo toglilo dall'insert. Bene, a posto. Adesso però devo dirgli che se il campo prin è si anche il campo anest diventa obbligatorio. Quindi ho costruito questo if. Ma seppure il campo prin è si non va alla pagina xx.asp.Le sto temtando tutte.
[code]
If isnull(anest) then
if prin="si" then
response.redirect (xx.asp)
else Sql = "INSERT into principale (etc. etc.
OBJConn.Execute(SQL)
Response.redirect "xx.html"
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
end if
else Sql = "INSERT into principale (etc. etc.
OBJConn.Execute(SQL)
Response.redirect "xx.html"
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
end if

Le sto temtando tutte.
Rispondi quotando