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

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
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
Code asp : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> 
<!--#Include File="connectionI.asp"--> 
<%
SESSION = session("mle" )
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
Code asp : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> 
<!--#Include File="connectionI.asp"--> 
 
<%e=session("mle" )%> 
<!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">&nbsp;</TD> 
                <TD class=textl width=576>&nbsp;</TD> 
                <TD width=12  
                background="bm_right.gif">&nbsp;</TD> 
              </TR> 
              <TR> 
                <TD width=12  
                background="bm_left.gif">&nbsp;</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&eacute; :</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&eacute;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&eacute;sil  
                            <option value="bg" >Bulgarie 
                            <option value="ca" >Canada 
                            <option value="cl" >Chili 
                            <option value="cn">Chine (R&eacute;p. pop.)  
                            <option value="co" >Colombie 
                            <option value="kr">Cor&eacute;e, Sud  
                            <option value="cr" >Costa Rica 
                            <option value="hr" >Croatie 
                            <option value="dk" >Danemark 
                            <option value="eg">&Eacute;gypte  
                            <option value="ae">&Eacute;mirats arabes unis  
                            <option value="ec">&Eacute;quateur  
                            <option value="us">&Eacute;tats-Unis  
                            <option value="sv" >El Salvador 
                            <option value="es" >Espagne 
                            <option value="fr">France  
                            <option value="fi" >Finlande 
                            <option value="gr">Gr&egrave;ce  
                            <option value="hk" >Hong Kong 
                            <option value="hu" >Hongrie 
                            <option value="in" >Inde 
                            <option value="id">Indon&eacute;sie  
                            <option value="ie" >Irlande 
                            <option value="il">Isra&euml;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&egrave;ge  
                            <option value="nz">Nouvelle-Z&eacute;lande  
                            <option value="pe">P&eacute;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&eacute;publique tch&egrave;que  
                            <option value="ro" >Roumanie 
                            <option value="uk" >Royaume-Uni 
                            <option value="ru" >Russie 
                            <option value="sg" >Singapour 
                            <option value="se">Su&egrave;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&eacute;nie  
                            <option value="aw" >Aruba 
                            <option value="az">Azerba&iuml;djan  
                            <option value="bs" >Bahamas 
                            <option value="bh" >Bahrain 
                            <option value="bd" >Bangladesh 
                            <option value="by">Bi&eacute;lorussie  
                            <option value="bz" >Belize 
                            <option value="bj" >Benin 
                            <option value="bm" >Bermudes (Les) 
                .....
                 ......            
                            </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">&nbsp; </P> 
                            <span class="Style2"> 
                            <input type="submit" name="Submit" value="Soumettre"class="buttonInput"> 
                            <input type="reset" name="Submit" value="R&eacute;initialiser" class="buttonInput"> 
                          </span></TD> 
                      </TR> 
                      <TR> 
                        <TD colSpan=3>&nbsp;</TD> 
                      </TR> 
                    </TBODY> 
                </TABLE></TD> 
                <TD width=12  
                background="bm_right.gif">&nbsp;</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> 
...


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: