DO
if Request.Form("Action") = "CREATE" and strCreate = "Y" then
IF strPersonId <> "" then
for iLoop = 0 to UBound(astrSubTest)
if Request.Form(astrSubTest(iLoop) & "CodeID") <> "" then
if DBConnNextKey
.Errors
.Count > 0 then
for iLoop2
= 0 to DBConnNextKey
.Errors
.Count - 1 if Request.Form(astrSubTest(iLoop) & "V") = "" then
else
if DBConnU
.Errors
.Count > 0 then
if DBConnU
.Errors
.Count = 0 then
else
for iLoop2
= 0 to DBConnU
.Errors
.Count - 1 if Request.Form("Action") = "UPDATE" and strUpdate = "Y" then
IF strPersonId <> "" then
for iLoop = 0 to UBound(astrSubTest)
if Request.Form(astrSubTest(iLoop) & "ID") = "" then 'row does not exist
if Request.Form(astrSubTest(iLoop) & "CodeID") <> "" then 'Create
if DBConnNextKey
.Errors
.Count > 0 then
for iLoop2
= 0 to DBConnNextKey
.Errors
.Count - 1 if Request.Form(astrSubTest(iLoop) & "V") = "" then
else
elseif Request.Form(astrSubTest(iLoop) & "CodeID") = "" then 'Delete
else 'Update
if Request.Form(astrSubTest(iLoop) & "V") = "" then
else
if strSQL <> "" then
if DBConnU
.Errors
.Count > 0 then
if DBConnU
.Errors
.Count = 0 then
else
for iLoop
= 0 to DBConnU
.Errors
.Count - 1 if Request.Form("Action") = "DELETE" and strDelete = "Y" then
IF strPersonId <> "" then
for iLoop = 0 to UBound(astrSubTest)
if Request.Form(astrSubTest(iLoop) & "ID") <> "" then 'row exists
end if
next
if DBConnU.Errors.Count = 0 then
else
for iLoop = 0 to DBConnU.Errors.Count - 1
next
end if
End IF
end if
LOOP UNTIL TRUE