dim objcmd_ver as new oledbcommand (" select * from allievi where numero_tessera = '"& numero_tessera_utente &"' ", objconn)
dim read as oledbdatareader
objconn.open
read=objcmd_ver.executereader
dim la_tessera as string
dim il_nome as string
dim il_cognome as string
dim data_nascita as string
dim anno_associazione as integer
while read.read
la_tessera=(read.getstring(1))
il_nome=(read.getstring(2))
il_cognome=(read.getstring(3))
data_nascita=(read.getstring(6))
anno_associazione=(read.getint32(17))
end while
read.close
objcmd_ver.connection.close()
response.Write(la_tessera & "
")
response.Write(il_nome & "
")
response.Write(il_cognome & "
")
response.Write(data_nascita & "
")
response.Write(anno_associazione & "
")
if (la_tessera <> numero_tessera_utente) then
inserisci2()
else
if (la_tessera = numero_tessera_utente and il_nome <> nome_utente or il_cognome <> cognome_utente or data_nascita <> data_di_nascita_utente) then
messaggio.text="dati non corrispondenti all'id"
else
if (la_tessera = numero_tessera_utente and il_nome = nome_utente and il_cognome = cognome_utente and data_nascita = data_di_nascita_utente and anno_associazione = anno) then
messaggio.text="utente già iscritto in questo anno"
else
if (la_tessera = numero_tessera_utente and il_nome = nome_utente and il_cognome = cognome_utente and data_nascita = data_di_nascita_utente and anno_associazione <> anno) then
inserisci2()
end if
end if
end if
end if