asp , erreur insertion dans bd access - ASP - Programmation
Marsh Posté le 27-07-2007 à 09:59:07
Résolu,
pour ce qui auront un probleme, similaire, il faut pas utiliser Module comme nom d'une ligne de table, et faire attention au ligne suprimer dans le mode creation de la table,(il reste des traces), on tout cas merci a tous ce qui lu mon poste.
Marsh Posté le 25-07-2007 à 19:21:25
salut
voici mon probleme
quand je veut faire une insertion des champs de mon formulaire(formct.asp), une redirection est faite pour la page (InsertRegformct.asp),et la il m'affiche l'erreur
---------------------------------------------------
Erreur de syntaxe dans l'instruction INSERT INTO |
/....../InsertRegformct.asp, line 16 |
---------------------------------------------------
pourtant j'ai ajouté une ligne dans cette page pour verifier la requete et elle s'affiche , evidament c'est avant l'erreur,je fait copier la requete dans access et elle s'execute sans probleme
voici la structure de la tablede Formation_continue (RecordId,Matricule, Dated, Datef, Temoin, Organisme, Module, Nbheure, Specialite, Pays, Ville) tous de type texte , sauf RecordId [numero auto]
voici le code des pages
_________________
InsertRegformct.asp|
------------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#Include File="connectionI.asp"-->
SESSION=<%=session("mle" )%><br>
<%e=session("mle" )%>
<%
Dim SQLInsertNew, dated, datef, temoin, organisme, module, nbheure, specialite, pays, ville
SQLInsertNew = "INSERT INTO Formation_continue (Matricule, Dated, Datef, Temoin, Organisme, Module, Nbheure, Specialite, Pays, Ville) VALUES ('" & e & "', '" & Request.Form("dated" ) & "', '" & Request.Form("datef" ) & "', '" & Request.Form("temoin" ) & "', '" & Request.Form("organisme" ) & "', '" & Request.Form("module" ) & "', '" & Request.Form("nbheure" ) & "', '" & Request.Form("specialite" ) & "', '" & Request.Form("pays" ) & "', '" & Request.Form("ville" ) & "') "
conn.Execute SQLInsertNew
conn.close
set conn = nothing
Response.Redirect("formct.asp" )
%>
------------------------------------------------------------------------------------------------------------
_________
formct.asp|
-----------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#Include File="connectionI.asp"-->
<%e=session("mle" )%>
<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Formation continue</title>
<script>
function confirmDelete(delUrl) {
if (confirm("Are you sure you want to delete this record...?" )) {
document.location = delUrl;
}
}
</script>
<script language="javascript" src="twvalide.js" type="text/javascript"></script>
<script type='text/javascript'>
function t(num)
{
for (var i = 1; i <= 5; i++) {
disableInput(("t" + i), (i > num));
}
}
function copieInput(idInputSource, idInputResult, idCheckBox)
{
var inputS = document.getElementById(idInputSource);
var inputR = document.getElementById(idInputResult);
var checkbox = document.getElementById(idCheckBox);
if (checkbox.checked == false) {
disableInput(idInputResult, false);
} else {
disableInput(idInputResult, true);
inputR.value = inputS.value;
}
}
function disableInput(idInput, valeur)
{
var input = document.getElementById(idInput);
input.disabled = valeur;
if (valeur) {
input.style.background = "#CCC";
BSajoute(idInput);
} else {
input.style.background = "#FFF";
BSsuppr(idInput);
}
}
function BSajoute(idInput)
{
for (var i = 0; i < tableauBS.length; i++) {
if (tableauBS[i] == idInput) {
return;
}
}
tableauBS.push(idInput);
}
function BSsuppr(idInput)
{
for (var i = 0; i < tableauBS.length; i++) {
if (tableauBS[i] == idInput) {
//alert(idInput + " supprimé à la position " + i + "\n" +tableauBS);
tableauBS.splice(i, 1);
return;
}
}
}
/**
* A appeler dans le onsubmit du form pour que
* les champs puissent transmettre leurs valeurs
*/
function activeBeforeSubmit()
{
while (tableauBS.length > 0) {
var idInput = tableauBS.pop();
var input = document.getElementById(idInput);
input.disabled = false;
}
}
</script>
<style>
.textInput {
padding-left: 2px;
border: solid 1px #6699CC;
background-color: #CBDCED;
font-family: Trebuchet MS, Tahoma;
font-size: 8pt;
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#CBDCED', EndColorStr='#FFFFFFFF');
}
.buttonInput {
height: 20px;
border: solid 1px #6699CC;
background-color: #DBEED7;
font-family: Trebuchet MS, Tahoma;
font-size: 8pt;
font-weight: bold;
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#CBDCED',EndColorStr='#6699CC');
}
td { font-size : 8pt; font-family : Verdana, Arial; text-decoration : none; }
body {
font-size : 8pt;
font-family : Verdana, Arial;
text-decoration : none;
background-color: #FFFFFF;
}
.Style2 {color: #FF0000}
.Style3 {color: #003399}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="sitestyles.css" rel="stylesheet" type="text/css" />
</head>
<body text="BLACK">
<script type="text/javascript" language="javascript">
var varValid = "matricule,nom,prenom,temoin,datef";
var nlang = "fr"
</script>
<form method="post" action="InsertRegformct.asp" name="FormVal" onSubmit="return twValide(this);">
<center><script menumaker src="update.js"></script></center><br>
<%
Dim SQLm, rs
SET rs = Server.CreateObject("ADODB.RecordSet" )
SQLm = "SELECT * FROM salarie WHERE Matricule = '" & e & " '"
rs.open SQLm,conn,3,3
If rs.RecordCount <> 0 Then
%>
<TABLE width=600 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="100%"><TABLE cellSpacing=0 cellPadding=0 width=600 border=0>
<!--DWLayoutTable-->
<TBODY>
<TR vAlign=top align=left>
<TD vAlign=bottom width=12 height=4><IMG
src="bm_01.gif"></TD>
<TD width=577 colspan="6"><IMG height=4
src="bm_top.gif"
width=620></TD>
<TD vAlign=bottom width=12 height=4><IMG
src="bm_03.gif"></TD>
</TR>
<TR vAlign=top align=left>
<TD><IMG
src="bm1_02.gif" width="12" height="20"></TD>
<TD colspan="6"
background="spacer_b.gif"><P><IMG height=3
src="D:\projet recru stage\CV\Menara Le Portail du Maroc_fichiers\1px(1).gif"
width=3 border=0><FONT color=#22447e><BR>
<strong>Information personnel </strong></FONT></P></TD>
<TD><IMG
src="bm1_04.gif" width="12" height="20"></TD>
</TR>
<TR vAlign=top align=left height=5>
<TD rowspan="2"
background="bm_left.gif"></TD>
<td height="22" align="right" bgcolor="#F5F5F5"><span class="Style3">MATRICULE : </span></td>
<td bgcolor="#F5F5F5"><input name="matricule" type="text" id="matricule" value="<%=session("mle" )%>"></td>
<td bgcolor="#F5F5F5"><span class="Style3">NOM:</span></td>
<td bgcolor="#F5F5F5"><input name="nom" type="text" value="<%=rs("Nom" ) %>" readonly="true"></td>
<td bgcolor="#F5F5F5"><span class="Style3">PRENOM:</span></td>
<td bgcolor="#F5F5F5"><input name="renom" type="text" value="<%=rs("Prenom" ) %>" readonly="true"></td>
<TD rowspan="2"
background="bm_right.gif"></TD>
</TR>
<TR vAlign=top align=left height=5>
<TD colspan="6" rowspan="2" bgcolor="#F1F7FB"></TD>
</TR>
<TR vAlign=top align=left>
<TD><IMG
src="bm1_07.gif" width="12" height="21"></TD>
<TD><IMG
src="bm1_08.gif" width="12" height="21"></TD>
</TR>
<TR vAlign=top align=left>
<TD><IMG
src="bm_06.gif"></TD>
<TD colspan="6"><IMG height=4
src="bm_bot.gif"
width=620></TD>
<TD><IMG
src="bm_07.gif"></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<%
Dim SQLGetPeople, rsPeople
SET rsPeople = Server.CreateObject("ADODB.RecordSet" )
Dim Sorter
If Request.QueryString("SO" ) = "" then Sorter = " Dated" Else Sorter = Request.QueryString("SO" )
SQLGetPeople = "SELECT * FROM Formation_continue where Matricule = '" & e & "' ORDER BY " & Sorter & " ;"
rsPeople.Open SQLGetPeople, conn, 3, 3
%>
<TABLE width=600 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="100%"><TABLE cellSpacing=0 cellPadding=0 width=600 border=0>
<TBODY>
<TR vAlign=top align=left>
<TD vAlign=bottom width=12 height=4><IMG
src="bm_01.gif"></TD>
<TD width=576><IMG height=4
src="bm_top.gif"
width=576></TD>
<TD vAlign=bottom width=12 height=4><IMG
src="bm_03.gif"></TD>
</TR>
<TR vAlign=top align=left>
<TD width=12><IMG
src="bm1_02.gif" width="12" height="20"></TD>
<TD width=576
background="spacer_b.gif"><P><IMG height=3
src="D:\projet recru stage\CV\Menara Le Portail du Maroc_fichiers\1px(1).gif"
width=3 border=0><FONT color=#22447e><BR>
<B>Formation continue </B></FONT></P></TD>
<TD width=12><IMG
src="bm1_04.gif" width="12" height="20"></TD>
</TR>
<TR vAlign=top align=left height=5>
<TD width=12
background="bm_left.gif"> </TD>
<TD class=textl width=576> </TD>
<TD width=12
background="bm_right.gif"> </TD>
</TR>
<TR>
<TD width=12
background="bm_left.gif"> </TD>
<TD width=576><TABLE cellSpacing=1 cellPadding=2 width=570 border=0>
<TBODY>
<TR>
<TD width="214" bgColor=#f5f5f5><strong>Date de debut :</strong> </TD>
<TD colspan="2" bgColor=#f5f5f5><input name="dated" type="text" class="textInput" id="dated" onBlur="twValide_date(this,1950,2020,'jj/mm/aaaa')" size="10">
<font
color=#ff0000>*</font> </TD>
</TR>
<TR>
<TD bgColor=#f5f5f5><strong>date de fin:</strong></TD>
<TD width="145" bgColor=#f5f5f5><input name="datef" type="text" id="ida" onBlur="twValide_date(this,1950,2020,'jj/mm/aaaa')" size="10" class="textInput">
<font
color=#ff0000>*</font></TD>
<TD width="195" bgColor=#f5f5f5><input name="temoin" id="idactive" onClick="disableInput('ida', this.checked);" type="checkbox" />
En cours</TD>
</TR>
<TR>
<TD bgColor=#f5f5f5><strong>Organisme :</strong></TD>
<TD colspan="2" bgColor=#f5f5f5> <FONT
color=#ff0000>
<input name="organisme" type="text" id="organisme" class="textInput">
*</FONT></TD>
</TR>
<TR>
<TD vAlign=top bgColor=#f5f5f5><B>Module :</B></TD>
<TD colspan="2" bgColor=#f5f5f5> <FONT
color=#ff0000>
<input name="module" type="text" id="module" class="textInput">
*</FONT></TD>
</TR>
<TR>
<TD valign="top" bgColor=#f5f5f5><strong>Nombre d'heures :</strong></TD>
<TD colspan="2" bgColor=#f5f5f5><span class="texte"> </span> <FONT
color=#ff0000>
<input name="nbheure" type="text" id="nbheure" class="textInput">
* </FONT></TD>
</TR>
<TR>
<TD align="left" valign="top" bgColor=#f5f5f5><strong>Specialité :</strong></TD>
<TD colspan="2" align="left" valign="top" bgColor=#f5f5f5><span class="texte">
<input name="specialite" type="text" class="textInput" id="specialite">
</span> <FONT
color=#ff0000>*</FONT></TD>
</TR>
<TR>
<TD align="left" valign="top" bgColor=#f5f5f5><strong>Pays : </strong></TD>
<TD colspan="2" align="left" valign="top" bgColor=#f5f5f5><select name="pays" id="pays" class="textInput">
<option selected>[choisir]
<option value="af" >Afghanistan
<option value="za" >Afrique du sud
<option value="al" >Albanie
<option value="dz">Algérie
<option value="de" >Allemagne
<option value="sa" >Arabie saoudite
<option value="ar" >Argentine
<option value="au" >Australie
<option value="at" >Autriche
<option value="be" >Belgique
<option value="br">Brésil
<option value="bg" >Bulgarie
<option value="ca" >Canada
<option value="cl" >Chili
<option value="cn">Chine (Rép. pop.)
<option value="co" >Colombie
<option value="kr">Corée, Sud
<option value="cr" >Costa Rica
<option value="hr" >Croatie
<option value="dk" >Danemark
<option value="eg">Égypte
<option value="ae">Émirats arabes unis
<option value="ec">Équateur
<option value="us">États-Unis
<option value="sv" >El Salvador
<option value="es" >Espagne
<option value="fr">France
<option value="fi" >Finlande
<option value="gr">Grèce
<option value="hk" >Hong Kong
<option value="hu" >Hongrie
<option value="in" >Inde
<option value="id">Indonésie
<option value="ie" >Irlande
<option value="il">Israël
<option value="it" >Italie
<option value="jp" >Japon
<option value="jo" >Jordanie
<option value="lb" >Liban
<option value="my" >Malaisie
<option value="ma" >Maroc
<option value="mx" >Mexique
<option value="no">Norvège
<option value="nz">Nouvelle-Zélande
<option value="pe">Pérou
<option value="pk" >Pakistan
<option value="nl" >Pays-Bas
<option value="ph" >Philippines
<option value="pl" >Pologne
<option value="pr" >Porto Rico
<option value="pt" >Portugal
<option value="cz">République tchèque
<option value="ro" >Roumanie
<option value="uk" >Royaume-Uni
<option value="ru" >Russie
<option value="sg" >Singapour
<option value="se">Suède
<option value="ch" >Suisse
<option value="tw" >Taiwan
<option value="th" >Thailande
<option value="tr" >Turquie
<option value="ua" >Ukraine
<option value="ve" >Venezuela
<option value="yu" >Yougoslavie
<option value="as" >Samoa
<option value="ad" >Andorre
<option value="ao" >Angola
<option value="ai" >Anguilla
<option value="aq" >Antarctique
<option value="ag" >Antigua et Barbuda
<option value="am">Arménie
<option value="aw" >Aruba
<option value="az">Azerbaïdjan
<option value="bs" >Bahamas
<option value="bh" >Bahrain
<option value="bd" >Bangladesh
<option value="by">Biélorussie
<option value="bz" >Belize
<option value="bj" >Benin
<option value="bm" >Bermudes (Les)
<option value="bt" >Bhoutan
<option value="bo" >Bolivie
<option value="ba">Bosnie-Herzégovine
<option value="bw" >Botswana
<option value="bv">Bouvet (Îles)
<option value="io">Territoire Britan
<option value="vg">Vierges britanniques
<option value="bn" >Brunei
<option value="bf" >Burkina Faso
<option value="bi" >Burundi
<option value="kh" >Cambodge
<option value="cm" >Cameroun
<option value="cv" >Cap Vert
<option value="ky">Cayman (Îles)
<option value="cf">République centrafricaine
<option value="td" >Tchad
<option value="cx">Christmas (Île)
<option value="cc">Cocos (Îles)
<option value="km" >Comores
<option value="cg">Rép. Dém. du Congo
<option value="ck">Cook (Îles)
<option value="cu" >Cuba
<option value="cy" >Chypre
<option value="dj" >Djibouti
<option value="dm" >Dominique
<option value="do">République Dominicaine
<option value="tp" >Timor
<option value="gq">Guinée Equatoriale
<option value="er">Érythrée
<option value="ee" >Estonie
<option value="et" >Ethiopie
<option value="fk">Falkland (Île)
<option value="fo">Féroé (Îles)
<option value="fj">Fidji (République des)
<option value="gf">Guyane française
<option value="pf">Polynésie française
<option value="tf">Territoires français sud
<option value="ga" >Gabon
<option value="gm" >Gambie
<option value="ge">Géorgie
<option value="gh" >Ghana
<option value="gi" >Gibraltar
<option value="gl" >Groenland
<option value="gd" >Grenade
<option value="gp" >Guadeloupe
<option value="gu" >Guam
<option value="gt" >Guatemala
<option value="gn">Guinée
<option value="gw">Guinée-Bissau
<option value="gy" >Guyane
<option value="ht">Haïti
<option value="hm">Heard et McDonald
<option value="hn" >Honduras
<option value="is" >Islande
<option value="ir" >Iran
<option value="iq" >Irak
<option value="ci">Côte d'Ivoire
<option value="jm">Jamaïque
<option value="kz" >Kazakhstan
<option value="ke" >Kenya
<option value="ki" >Kiribati
<option value="kp">Corée du Nord
<option value="kw" >Koweit
<option value="kg" >Kirghizistan
<option value="la" >Laos
<option value="lv" >Lettonie
<option value="ls" >Lesotho
<option value="lr">Libéria
<option value="ly" >Libye
<option value="li" >Liechtenstein
<option value="lt" >Lithuanie
<option value="lu" >Luxembourg
<option value="mo" >Macau
<option value="mk">Macédoine
<option value="mg" >Madagascar
<option value="mw" >Malawi
<option value="mv">Maldives (Îles)
<option value="ml" >Mali
<option value="mt" >Malte
<option value="ma" >Maroc
<option value="mh">Marshall (Îles)
<option value="mq" >Martinique
<option value="mr" >Mauritanie
<option value="mu" >Maurice
<option value="yt" >Mayotte
<option value="fm">Micronésie
<option value="md" >Moldavie
<option value="mc" >Monaco
<option value="mn" >Mongolie
<option value="ms" >Montserrat
<option value="mz" >Mozambique
<option value="mm" >Myanmar
<option value="na" >Namibie
<option value="nr" >Nauru
<option value="np" >Nepal
<option value="an">Antilles néerlandaises
<option value="nc">Nouvelle Calédonie (Îles)
<option value="ni" >Nicaragua
<option value="ne" >Niger
<option value="ng" >Nigeria
<option value="nu" >Niue
<option value="nf">Norfolk (Îles)
<option value="mp">Mariannes du Nord (Îles)
<option value="om" >Oman
<option value="pw" >Palau
<option value="pa" >Panama
<option value="pg">Papouasie-Guinée
<option value="py" >Paraguay
<option value="pn">Pitcairn (Îles)
<option value="qa" >Qatar
<option value="re">Réunion (La)
<option value="rw" >Rwanda
<option value="gs">Géorgie et Sandwich
<option value="kn" >Saint-Kitts et Nevis
<option value="lc" >Sainte Lucie
<option value="vc">Saint Vincent
<option value="ws" >Samoa
<option value="sm">Saint-Marin (Rép. de)
<option value="st">São Tomé et Príncipe
<option value="sn">Sénégal
<option value="sc" >Seychelles
<option value="sl" >Sierra Leone
<option value="sk" >Slovaquie
<option value="si">Slovénie
<option value="so" >Somalie
<option value="lk" >Sri Lanka
<option value="sh">Sainte Hélène
<option value="pm" >Saint Pierre et Miquelon
<option value="sd" >Soudan
<option value="sr" >Suriname
<option value="sj">Svalbard et Jan Mayen
<option value="sz" >Swaziland
<option value="sy" >Syrie
<option value="tj" >Tadjikistan
<option value="tz" >Tanzanie
<option value="tg" >Togo
<option value="tk" >Tokelau
<option value="to" >Tonga
<option value="tt">Trinité et Tobago
<option value="tn" >Tunisie
<option value="tm">Turkménistan
<option value="tc">Turks et Caïques (Îles)
<option value="tv" >Tuvalu
<option value="um">Îles Mineures Éloignées
<option value="ug" >Ouganda
<option value="uy" >Uruguay
<option value="uz">Ouzbékistan
<option value="vu" >Vanuatu
<option value="va" >Vatican (Etat du)
<option value="vn" >Vietnam
<option value="vi">Vierges (Îles)
<option value="wf">Wallis et Futuna (Îles)
<option value="eh" >Sahara Occidental
<option value="ye" >Yemen
<option value="zr">Zaïre
<option value="zm" >Zambie
<option value="zw" >Zimbabwe
<option value="bb" >La Barbade
</select></TD>
</TR>
<TR>
<TD align="left" valign="top" bgColor=#f5f5f5><strong>Ville : </strong></TD>
<TD colspan="2" align="left" valign="top" bgColor=#f5f5f5><input name="ville" type="text" id="ville" class="textInput">
<span class="Style2">*</span></TD>
</TR>
<TR align="right">
<TD colSpan=3 align="right" bgColor=#f5f5f5><P align=right class="Style2"> </P>
<span class="Style2">
<input type="submit" name="Submit" value="Soumettre"class="buttonInput">
<input type="reset" name="Submit" value="Réinitialiser" class="buttonInput">
</span></TD>
</TR>
<TR>
<TD colSpan=3> </TD>
</TR>
</TBODY>
</TABLE></TD>
<TD width=12
background="bm_right.gif"> </TD>
</TR>
<TR vAlign=top align=left>
<TD width=12><IMG
src="bm1_07.gif" width="12" height="21"></TD>
<TD width=576
background="spacer_b.gif"></TD>
<TD width=12><IMG
src="bm1_08.gif" width="12" height="21"></TD>
</TR>
<TR vAlign=top align=left>
<TD width=12><IMG
src="bm_06.gif"></TD>
<TD width=576><IMG height=4
src="bm_bot.gif"
width=576></TD>
<TD width=12><IMG
src="bm_07.gif"></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
</form>
<%If rsPeople.RecordCount <> 0 Then%>
<table cellspacing="0" cellpadding="0">
<td width="80"></td>
</table>
<div align="center"><b>LISTE DES FORMATION :</b>
<b> (<%=rsPeople.RecordCount%> Enregistrements)</b></div>
<table width="900" border="0" bgcolor="LightSteelBlue" cellspacing="1" align="center">
<br>
<tr class="DataGridHeader">
<td width="132" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Dated" class="DataGridHeader">Date debut</a></td>
<td width="110" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Datef" class="DataGridHeader">Date fin </a></td>
<td width="108" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Organisme" class="DataGridHeader">Organisme</a></td>
<td width="109" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Module" class="DataGridHeader">Module</a></td>
<td width="146" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Nbheure" class="DataGridHeader">Nombre heures</a></td>
<td width="93" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Ville" class="DataGridHeader">Ville</a></td>
<td width="66" background="Images/bgtr.gif" bgcolor="#EBEBEB"> <a href="formct.asp?SO=Pays" class="DataGridHeader">Pays</a></td>
<td width="111" background="Images/bgtr.gif" bgcolor="#EBEBEB"> Options</td>
</tr>
<%
Dim PagesInSet
PagesInSet = (rsPeople.RecordCount / 25)
if inStr(PagesInSet,"." ) then PagesInSet = cInt(PagesInSet + 0.5) Else PagesInSet = PagesInSet End If
Dim PageStart
if Request.QueryString("PS" )= "" or cInt(Request.QueryString("PS" )) > cInt(PagesInSet) then PageStart = 1 Else PageStart = Request.QueryString("PS" ) End If
If PageStart = 1 then PageStart = 1 Else PageStart = ((PageStart * 25) - 24) End If
Dim PageEnd
PageEnd = PageStart + 24
If PageEnd => rsPeople.recordCount then PageEnd = rsPeople.RecordCount End If
rsPeople.Move PageStart -1
For i = PageStart to PageEnd
%>
<tr class="tablerowdata">
<td bgcolor="#FAFAFA"> <%=rsPeople("Dated" )%></td>
<td bgcolor="#EBEBEB"> <%=rsPeople("Datef" )%></td>
<td bgcolor="#FAFAFA"> <%=rsPeople("Organisme" )%></td>
<td bgcolor="#EBEBEB"> <%=rsPeople("Module" )%></td>
<td bgcolor="#FAFAFA"> <%=rsPeople("Nbheure" )%></td>
<td bgcolor="#EBEBEB"> <%=rsPeople("Ville" )%></td>
<td bgcolor="#FAFAFA"> <%=rsPeople("Pays" )%></td>
<td bgcolor="#EBEBEB"> <a href=javascript:confirmDelete('delRecformct.asp?Rec=<%=rsPeople("RecordID" )%>')>Delete</a> | <a href="formctedit.asp?Rec=<%=rsPeople("RecordID" )%>">Edit</a></td>
</tr>
<%
rsPeople.MoveNext
Next
%>
<tr>
<td colspan="8" background="Images/bgtr.gif"></td>
</tr>
</table>
<br>
<div align="center" class="tablerowdata"><br>
<br>
Page:
<%
For i = 1 to PagesInSet
%>
<a href="formini.asp?PS=<%=i%>&SO=<%=Request.QueryString("SO" )%>"><%=i%></a> |
<%
Next
%>
</div>
<%
Else
%>
No Records Found
<%
End If
%>
</body>
<%
rsPeople.Close
set rsPeople = Nothing
conn.close
set conn = nothing
%>
<%
Else
%>
<br>
<br>
<br>
<center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="250" id="error" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="error.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="error.swf" quality="high" bgcolor="#ffffff" width="400" height="250" name="error" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</center>
<%
End If
%>
<p> </p>
</body>
</html>
------------------------------------------------------------------------------------------------------------
AIDER MOI SVP,
{le meme code je l'ai utiliser dans 2 autre insertion,et ca marche bien, sauf la j'ai tout essayer je voie pas le probleme} :ange: