mmahdouch24
Messages postés2Date d'inscriptiondimanche 30 mars 2008StatutMembreDernière intervention26 avril 2008
-
4 avril 2008 à 12:44
cs_ghuysmans99
Messages postés3982Date d'inscriptionjeudi 14 juillet 2005StatutMembreDernière intervention30 juin 2013
-
5 avril 2008 à 01:14
salut,
j'arrive pas a me connecter a ma base de donnee mysql
j'ai crée uj schema intitulé "admission" et ma table "administrateur" voici mon code :
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open DSN_BASE
log=Request.form("login")
pass=Request.form("password")
Set Rs = Server.CreateObject("ADODB.Recordset")
SQL="SELECT password FROM administrateur where login='" & login & "'"
RS.open SQL,Conn,adLockPessimistic
set autRes=Conn.Execute[SQL]
if autRES.EOF=false then
if autRES("password") = password then
Response.Redirect("menu.asp")
else
Response.Redirect("erreur.html")
end if
Conn.Close
set Conn = nothing
%>
voici le message d'erreur qui s'affiche
Erreur de compilation Microsoft VBScripterror '800a0401'
Fin d'instruction attendue
/iisHelp/common/500-100.asp, line 11
Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^
Erreur de compilation Microsoft VBScripterror '800a0401'
Fin d'instruction attendue
/myweb/verification.asp, line 17
set autRes=Conn.Execute[SQL]
j'ai beau essayer ca marche pas
merci de m'aider
-----------------------^
Dim DSN_BASE, Conn, login, password, rs
DSN_BASE = "Driver={MySQL ODBC 3.51 Driver};Server=sql server;Port=3306;Database=admission;User=root;Password=root;Option=3;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open DSN_BASE
login=Request.form("login")
password=Request.form("password")
SQL="SELECT password FROM administrateur where login='" & Pure(login) & "' AND password='" & Pure(password) & "'"
Set rs = Conn.Execute(SQL)
if not(rs.EOF) then
Response.Redirect("menu.asp")
else
Response.Redirect("erreur.html")
end if
rs.Close
Set rs = Nothing
Conn.Close
set Conn = nothing
%>
_______________________________________________________________________
VB.NETis good ...VB6is better