Ho questo codice che ho creato per registrare gli utenti ma non funziona
L'errore è il seguente:codice:<% 'Save entered username, password, name and email Username = Request.Form("user") Password = Request.Form("pass") Nome = Request.Form("nome") Email = Request.Form("email") if (Username = "") and (Password = "") and (Name = "") then Response.Write("Compila tutti i campi!") elseif (Username = "") then Response.Write("Inserisci l'Username!") elseif (Password = "") then Response.Write("Inserisci la password!") elseif (Nome = "") then Response.Write("Inserisci il Nome!") elseif (Email = "") then Response.Write("Inserisci l'E-mail!") else 'Crea la connessione set conn = server.CreateObject ("ADODB.Connection") conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mapPath("database.mdb") 'controllo che lo username non sia già presente nel database trovato=false set rs = server.CreateObject ("ADODB.Recordset") sSQL="select * from Utenti where username='" & Username & "'" rs.open sSQL,conn,3,3 if not rs.eof then trovato = true end if if not trovato then 'Nuovo Record da inserire rs.AddNew 'Mettimi Username, Password, Nome e Email nei loro rispettivi campi rs("Username")= Username rs("Password")= Password rs("Nome")= Nome rs("Email")= Email 'Salva i dati rs.Update conn.execute(sSQL) rs.close set rs = nothing conn.close set conn=nothing Response.Write("Ciao " & Name & " , la registrazione è avvenuta con successo!") else Response.Write("Lo username " & Username & " , è già presente del database!") end if end if %>
La riga 46 è la seguente: rs.UpdateADODB.Recordset error '800a0c93'
Operation is not allowed in this context.
/hetfield/reg_verify.asp, line 46
Inoltre c'è qualcuno che mi può dire come inserire anche la data di registrazione dell'utente nel database che non so perniente come si faccia!
Saluti![]()

Rispondi quotando
