Bonjour, je suis sur un code qui gère de l'asp à partir de flash.
La partie surlaquelle je bloque est pour l'enregistrement, j'ai crée une page asp qui permet de récupérer les données de flash est les enregistre dans la base.
Mais elle cherche si le pseudo que l'utilisateur entre existe déjà, puis renvoie une variable sous Granted ou Denied si le pseudo existe ou non.
Le problème est que au test, la page fait un peu n'importe quoi, de temps en temps elle va sous Granted d'autre sous Denied, voila le code de ma page asp:
<%
Set Con1 = Server.CreateObject("ADODB.Connection")
Con1.ConnectionTimeout = 15
Con1.CommandTimeout = 30
Con1.Open "DSN=flash.dsn;"
%>
<%Dim myconnection__strUserID
myconnection__strUserID = "x"
if(Request.Form("UserID") <> "") then myconnection__strUserID = Request.Form("UserID")
Dim myconnection__strPassword
myconnection__strPassword = "1"
if(Request.Form("Password") <> "") then myconnection__strPassword = Request.Form("Password")
Dim myconnection__strLastName
if(Request.Form("LastName") <> "") then myconnection__strLastName = Request.Form("LastName")
Dim myconnection__strFirstName
if(Request.Form("FirstName") <> "") then myconnection__strFirstName = Request.Form("FirstName")
Dim myconnection__Email
if(Request.Form("Email") <> "") then myconnection__strEmail = Request.Form("Email")
set myconnection = Server.CreateObject("ADODB.Recordset")
myconnection.ActiveConnection = "dsn=flash.dsn;"
myconnection.Source = "SELECT * FROM AccesMdp WHERE pseudo = '" + Replace(myconnection__strUserID, "'", "''") + "'"
myconnection.CursorType = 0
myconnection.CursorLocation = 2
myconnection.LockType = 3
myconnection.Open
myconnection_numRows = 0
%>
<%
If NOT myconnection.EOF Then
Response.Write "login=Denied"
else
Ajout = "INSERT INTO AccesMdp (pseudo, motdepasse, email, prenom, nom)" & "VALUES ('"+myconnection__strUserID+"', '"+myconnection__strPassword+"', '"+myconnection__strEmail+"', '"+myconnection__strFirstName+"', '"+myconnection__strLastName+"')"
Set RS = Con1.Execute(Ajout)
Response.Write "login=Granted"
End If
set RS = nothing
set Con1 = nothing
set myconnection = nothing
set myconnection__strUserID = nothing
%>