ludwigfve
Messages postés52Date d'inscriptionlundi 13 février 2006StatutMembreDernière intervention10 juillet 2008
-
2 juin 2008 à 17:52
ludwigfve
Messages postés52Date d'inscriptionlundi 13 février 2006StatutMembreDernière intervention10 juillet 2008
-
2 juin 2008 à 17:54
Bonjour voila mon probléme
je veux verifier qu'un enregsitrement n'existe pas dans ma table acces avec le meme nom la meme date resa et la meme heure de debut et la meme heure de fin jusque la tout va bien,
la ou ça ne marche plus c'est lorsque que je veux verifier entre l'heure de debut et de fin a savoir entre 08h30 et 10h30 afin que je ne puisse pas inserer un enregistrement a 09h00 ou 10h00
aidez moi svp
<%
Dim check__MMColParam
check__MMColParam = "1"
If (Request.Form("salon") <> "") Then
check__MMColParam = Request.Form("salon")
End If
%>
<%
Dim check__MMColParam2
check__MMColParam2 = "1"
If (Request.Form("resa") <> "") Then
check__MMColParam2 = Request.Form("resa")
End If
%>
<%
Dim check__MMColParam3
check__MMColParam3 = "0"
If (Request.Form("debut") <> "") Then
check__MMColParam3 = Request.Form("debut")
End If
%>
<%
Dim check__MMColParam4
check__MMColParam4 = "0"
If (Request.Form("fin") <> "") Then
check__MMColParam4 = Request.Form("fin")
End If
%>
<%
Dim check
Dim check_cmd
Dim check_numRows
Set check_cmd = Server.CreateObject ("ADODB.Command")
check_cmd.ActiveConnection = MM_wilson_STRINGcheck_cmd.CommandText "SELECT * FROM salons WHERE salon ? AND date_de_reservation = ? AND heure_de_debut = ? AND heure_de_fin = ?"
check_cmd.Prepared = true
check_cmd.Parameters.Append check_cmd.CreateParameter("param1", 200, 1, 255, check__MMColParam) ' adVarChar
check_cmd.Parameters.Append check_cmd.CreateParameter("param2", 200, 1, 255, check__MMColParam2) ' adVarChar
check_cmd.Parameters.Append check_cmd.CreateParameter("param3", 200, 1, 255, check__MMColParam3) ' adVarChar
check_cmd.Parameters.Append check_cmd.CreateParameter("param4", 200, 1, 255, check__MMColParam4) ' adVarChar
Set check = check_cmd.Execute
check_numRows = 0
%>