IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP Discussion :

erreur de requête


Sujet :

ASP

  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut erreur de requête
    Bonjour a tous, j'ai bientot fini de vous embéter, il me reste qu'une erreur de requête, et la je vois pas parce que elle marchait il a deux semaine

    Voici le code:

    Code : 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
    <%
          										' Déclaration de variables
    										  	dim date_article 
    											dim nom_article 
    											dim lien_article
    											dim source 
    											dim com
    											dim num_pub
    											dim date_fin_pub
    											dim objCnx 
    											dim mySql
    											if Len(Request.Form("Btn_enregistrer")) > 0 Then	'instruction IF pour tester la valeur du bouton Cmd_enregistrer
    												' affectations
    												date_article =Request.Form("date_article")
    												nom_article =Request.Form("nom_article")
    												com =Request.Form("commentaire")
    												lien_article =Request.Form("lien_article")											
    												num_pub =Request.Form("num_pub")
    												date_fin_pub =Request.Form("date_fin_pub")
    												set objCnx = dbConnect("BNW0001B" , "IUSR_BNW0001B" , "VF85DS" , "") 'création de l'objet de connexion qui va se connecter à la base de données
    												mySql="Insert Into BREVE ( nom_breve, date_breve, commentaire, source,  lien, date_fin, num_publication) VALUES ( ' " & nom_article & " ', ' " & date_article & " ', ' " & com & " ', ' " & source & " ', ' " & lien_article & " ', ' " & date_fin_pub & " ', ' " & num_pub & " ' )"  'requête d'insertion des valeurs saisies dans le formulaire dans la base de données										
    												objCnx.Execute( mySql )	'éxécution de la requête
    												dbDisconnect( objCnx )	'deconnexion à la base de données
    												Set objCnx= Nothing	'on détruit l'objet objCnx
    											end if	'fin de l'instruction IF
    											%>
    et voici l'erreur générée:

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Conflit entre l'instruction INSERT et la contrainte COLUMN FOREIGN KEY 'FK_BREVE_PUBLICATION1'. Le conflit est survenu dans la base de données 'BNW0001B', table 'PUBLICATION', column 'num_publication'.
    /juridique/formulaire2.asp, line 418
    La ligne 418 est celle ci:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    mySql="Insert Into BREVE ( nom_breve, date_breve, commentaire, source,  lien, date_fin, num_publication) VALUES ( ' " & nom_article & " ', ' " & date_article & " ', ' " & com & " ', ' " & source & " ', ' " & lien_article & " ', ' " & date_fin_pub & " ', ' " & num_pub & " ' )"  'requête d'insertion des valeurs saisies dans le formulaire dans la base de données
    J'en profite pour remercier particuliérement pC75, immobilis et crazygirl pour leur aide tout au long de mon projet

  2. #2
    Membre averti Avatar de Crazyblinkgirl
    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    341
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 341
    Points : 344
    Points
    344
    Par défaut
    Bonjour os_rasta,

    As-tu modifié les valeurs dans ta base?

    Je crois que ton erreur est due au fait que tu veuilles insérer une ligne dans BREVE dont le num_publication n'existe pas. Vérifies la valeur de "num_publication" et si elle est bien présente dans ta table PUBLICATION.

  3. #3
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut
    Je crois que ton erreur est due au fait que tu veuilles insérer une ligne dans BREVE dont le num_publication n'existe pas. Vérifies la valeur de "num_publication" et si elle est bien présente dans ta table PUBLICATION.
    Si elle est présente , ne serai ce pas une erreur de type?

  4. #4
    Membre averti Avatar de Crazyblinkgirl
    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    341
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 341
    Points : 344
    Points
    344
    Par défaut
    Comme ca je ne vois pas trop mais j'ai trouvé ca :

    http://sqlpro.developpez.com/cours/s.../?page=partie2

    Regardes les exemples 74 et 75 (7.1.7. Intégrité référentielle (FOREIGN KEY / REFERENCES)).

    En espérant que cela pourra t'aider.

  5. #5
    Expert confirmé
    Avatar de pc75
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    3 662
    Détails du profil
    Informations personnelles :
    Âge : 68
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Septembre 2004
    Messages : 3 662
    Points : 4 047
    Points
    4 047
    Par défaut
    Re,

    Peux-tu nous afficher le résultat d'un response.Write(mySql) ?

  6. #6
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut
    Je peux pas l'afficher dès que je clique sur le bouton j'ai le message d'erreur

  7. #7
    Membre averti Avatar de Crazyblinkgirl
    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    341
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 341
    Points : 344
    Points
    344
    Par défaut
    Affiches seulement la requête sans l'executer

  8. #8
    Expert confirmé
    Avatar de pc75
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    3 662
    Détails du profil
    Informations personnelles :
    Âge : 68
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Septembre 2004
    Messages : 3 662
    Points : 4 047
    Points
    4 047
    Par défaut
    Re,

    Tu mets le execute en commentaire et tu rajoutes le response.write

  9. #9
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut
    Voila il m'affiche ça?


    Insert Into BREVE ( nom_breve, date_breve, commentaire, source, lien, date_fin, num_publication) VALUES ( ' ', ' ', ' ', ' ', ' ', ' ', ' ')

  10. #10
    Membre averti Avatar de Crazyblinkgirl
    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    341
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 341
    Points : 344
    Points
    344
    Par défaut
    Peux-tu nous montrer la partie avec ton formulaire?

  11. #11
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut
    Code : 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
    <tr>
    						<td>
                                <table border="1" width="100%" height="362">
                                  <tr>
                                    <td width="100%" height="356" valign="top"><font color="#008080"><b><u><br>
                                      Numéro de semaine:</u></b></font>
                                      <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                        <!--webbot bot="SaveResults" startspan
                                        U-File="_private/form_results.txt"
                                        S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
                                        bot="SaveResults" endspan i-checksum="43374" --><p><input type="text" name="num_semaine" size="12"><input type="submit" value="Mise à jour" name="Cmd_semaine"></p>
                                      </form>
     
                                      <p><font color="#008080"><b><u>
                                      1) Insérer
                                      une nouvelle actualité sur le site Intranet:<br>
                                     <form action="formulaire2.asp" method="POST" webbot-action="--WEBBOT-SELF--">
                                             <!--webbot bot="SaveResults" startspan
                                             U-File="_private/form_results.txt"
                                             S-Format="TEXT/CSV"
                                             S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="1"><!--webbot
                                             bot="SaveResults" endspan i-checksum="43406" -->
    										 </u></b></font>
                                      <table border="1" width="829" height="26" bordercolor="#008080" bordercolorlight="#FFFFFF" bordercolordark="#008080">
                                        <tr>
                                          <td width="87" height="32">Nom de
                                            l'article</td>
                                          <td width="108" height="32">Date de
                                            l'article</td>
                                          <td width="105" height="32">commentaire</td>
                                          <td width="89" height="32">source</td>
                                          <td width="103" height="32">Lien de
                                            l'article</td>
                                          <td width="128" height="32">Date de fin de
                                            publication</td>
                                          <td width="112" height="32">Numéro de
                                            publication</td>
                                          <td width="121" height="32">Enregistrer</td>
                                        </tr>
                                        <tr>
                                          <td width="87" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                            <input type="text" name="nom_article" size="8">
                                            </form>
                                          </td>
                                          <td width="108" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="2"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43438" -->
                                            <input type="text" name="date_article" size="10">
                                            </form>
                                          </td>
                                          <td width="105" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="3"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43470" -->
                                            <input type="text" name="commentaire" size="12">
                                            </form>
                                          </td>
                                          <td width="89" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="4"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43502" -->
                                            <input type="text" name="source" size="8">
                                            </form>
                                          </td>
                                          <td width="103" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="5"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43534" -->
                                            <input type="text" name="lien_article" size="14">
                                            </form>
                                          </td>
                                          <td width="128" height="1" align="left" valign="middle">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="6"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43566" -->
                                              <p><input type="text" name="date_fin_pub" size="12"></p>
                                            </form>
                                          </td>
                                          <td width="112" height="1">
                                            <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
    </script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="formulaire2.asp" onsubmit="return FrontPage_Form9_Validator(this)" name="FrontPage_Form9" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="7"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43598" --><!--webbot
                                              bot="Validation" S-Data-Type="Number"
                                              S-Number-Separators="x," -->
                                            <input type="text" name="num_pub" size="9">
                                            </form>
                                          </td>
                                          <td width="121" height="1">
                                          </form>
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="8"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43630" -->
                                              <p><input type="submit" value="Enregistrer" name="Btn_enregistrer"></p>
                                            </form>
     
                                          </td>
     
                                          <td width="15" height="1">
     
    										 </tr>
                                      </table>
                                      <p><font color="#008080"><b><u>2) Insérer un
                                      nouveau dossier juridique sur le site Intranet:</u></b></font></p>
                                      <table border="1" width="90%" height="20" bordercolor="#008080" bordercolordark="#008080" bordercolorlight="#FFFFFF">
                                        <tr>
                                          <td width="26%" height="32">Nom de
                                            dossier</td>
                                          <td width="21%" height="32">date dossier</td>
                                          <td width="17%" height="32">Commentaire</td>
                                          <td width="20%" height="32">Lien</td>
                                          <td width="22%" height="32">Numéro de
                                            publication</td>
                                          <td width="38%" height="32">Enregistrer</td>
                                        </tr>
                                        <tr>
                                          <td width="26%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="9"><!--webbot
                                              bot="SaveResults" endspan i-checksum="43662" -->
                                              <p><input type="text" name="nom_dossier" size="11">
                                              </p>
                                            </form>
                                          </td>
                                          <td width="21%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="10"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40780" -->
                                              <p><input type="text" name="date_dossier" size="12"></p>
                                            </form>
                                          </td>
                                          <td width="17%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="11"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40844" -->
                                            <input type="text" name="com_dossier" size="11">
                                            </form>
                                          </td>
                                          <td width="20%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="12"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40908" -->
                                            <input type="text" name="lien_dossier" size="11">
                                            </form>
                                          </td>
                                          <td width="22%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="13"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40972" -->
                                            <input type="text" name="num_pubdossier" size="9">
                                            </form>
                                          </td>
                                          <td width="38%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="14"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41036" -->
                                              <p><input type="submit" value="Enregistrer" name="Btn_dossier"></p>
                                            </form>
                                          </td>
                                        </tr>
                                      </table>
                                      <p><font color="#008080"><b><u>3) Insérer un
                                      nouveau cas pratique du site:</u></b></font></p>
                                      <table border="1" width="68%" height="1" bordercolor="#008080" bordercolorlight="#FFFFFF" bordercolordark="#008080">
                                        <tr>
                                          <td width="12%" height="31">Nom du cas
                                            pratique</td>
                                          <td width="19%" height="31">Date du cas
                                            pratique</td>
                                          <td width="15%" height="31">Commentaire</td>
                                          <td width="41%" height="31">Lien</td>
                                          <td width="25%" height="31">Numéro de
                                            Publication</td>
                                          <td width="25%" height="31">Enregistrer</td>
                                        </tr>
                                        <tr>
                                          <td width="12%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="15"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41100" -->
                                            <input type="text" name="nom_cas" size="9">
                                            </form>
                                          </td>
                                          <td width="19%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="16"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41164" -->
                                            <input type="text" name="date_cas" size="10">
                                            </form>
                                          </td>
                                          <td width="15%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="17"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41228" -->
                                            <input type="text" name="com_cas" size="9">
                                            </form>
                                          </td>
                                          <td width="41%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="18"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41292" -->
                                            <input type="text" name="lien_cas" size="8">
                                            </form>
                                          </td>
                                          <td width="25%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="19"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41356" --><input type="text" name="num_publcas" size="9">
                                            </form>
                                          </td>
                                          <td width="153%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="20"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40812" -->
                                              <p><input type="submit" value="Enregistrer" name="cmd_cas"></p>
                                            </form>
                                          </td>
                                        </tr>
                                      </table>
                                      <p><font color="#008080"><b><u>4) Insérer un
                                      nouveau lien vers un site:&nbsp;</u></b></font></p>
                                      <table border="1" width="106%" height="1" bordercolorlight="#FFFFFF" bordercolordark="#008080" bordercolor="#008080">
                                        <tr>
                                          <td width="13%" height="13">Nom site</td>
                                          <td width="14%" height="13">Commentaire</td>
                                          <td width="9%" height="13">numéro de
                                            publication</td>
                                          <td width="13%" height="13">Enregistrer</td>
                                          <td width="25%" height="13"></td>
                                        </tr>
                                        <tr>
                                          <td width="13%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="21"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40876" --><input type="text" name="nom_site" size="11">
                                            </form>
                                          </td>
                                          <td width="14%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="22"><!--webbot
                                              bot="SaveResults" endspan i-checksum="40940" --><input type="text" name="commentaire_site" size="12">
                                            </form>
                                          </td>
                                          <td width="9%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="23"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41004" --><input type="text" name="numero_pub_site" size="14">
                                            </form>
                                          </td>
                                          <td width="13%" height="1">
                                            <form method="POST" action="formulaire2.asp" webbot-action="--WEBBOT-SELF--">
                                              <!--webbot bot="SaveResults" startspan
                                              U-File="_private/form_results.txt"
                                              S-Format="TEXT/CSV"
                                              S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="24"><!--webbot
                                              bot="SaveResults" endspan i-checksum="41068" -->
                                              <p></p>
                                            </form>

  12. #12
    Expert confirmé
    Avatar de pc75
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    3 662
    Détails du profil
    Informations personnelles :
    Âge : 68
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Septembre 2004
    Messages : 3 662
    Points : 4 047
    Points
    4 047
    Par défaut
    Re,

    Une question : Pourquoi toutes ces balises <form>...</form> ?

  13. #13
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut
    Je les ai toutes suprrimer et mis une en entré et une en sortie et ça marche merci beaucoup.
    Par contre j'ai un petit problème sur une autre requête et la j'avoue je comprend pas.

    Dans la page dossier juridique elle marche voila le code:

    Code : 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
    <% 
    if Len(Request.Form("Cmd_semaine")) > 0 Then	'on test si la valeur du bouton Cmd_semaine est positif: si l'utilisateur a appuyé sur le bouton
    	dim objRecordset	'déclaration du curseur
    	dim objCnx	'déclaration de l'objet de connexion
    	set objCnx = dbConnect("BNW0001B" , "IUSR_BNW0001B" , "VF85DS" , "") 'l objet de connexion se connecte à la base de données.
    	set objRecordset=Server.CreateObject("ADODB.Recordset")	'le curseur est créer sur la base de données
     
       objRecordset.Open " SELECT num_dossier , nom_dossier , date_dossier , commentaire, lien FROM JURIDIQUE, PUBLICATION WHERE PUBLICATION.num_publication=JURIDIQUE.num_publication ORDER BY date_dossier DESC ", objCnx 	'requête permettant de sélectionner tout les enregistrements de la table JURIDIQUE et en les classant par ordre
       objRecordset.MoveFirst     'on place le curseur sur le premier enregistrement 
     
    	Do While Not objRecordset.EOF	'boucle qui permet de faire des instruction jusqu'a la fin des enregistrements.
    	 %>	
     
     
     
    								<table border="1" width="836" height="67">				
                                <tr>
                                                              <td width="495" height="23" valign="middle" bordercolor="#009999" bgcolor="#009999" align="left">
                                    <form method="POST" action="--WEBBOT-SELF--">
                                      <!--webbot bot="SaveResults" startspan
                                      U-File="_private/form_results.txt"
                                      S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
                                      bot="SaveResults" endspan --><p><input type="text" name="Titre" size="84" value="	<%=objRecordset("nom_dossier")%>" style="color: #FFFFFF; background-color: #009999; font-variant: small-caps; font-weight: bold; text-align: left; border: 0 solid #C0C0C0"></p>
     
     
                                  <td width="142" height="23" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center">
                                    <input type="text" name="date" size="11" value="<%=objRecordset("date_dossier")%>" style="font-family: Arial; font-size: 10 pt">
     
     
                                </tr>
                                <tr>
                                  <td width="787" height="25" valign="middle" bgcolor="#C0C0C0" align="left">
                                                                    <p><input type="text" name="Corp" size="112" value="<%=objRecordset("commentaire")%>" style="background-color: #C0C0C0; font-family: Arial; font-size: 10 pt; text-align: left; border-style: solid; border-color: #C0C0C0"></p>
     
                                  </td>
                                  <td width="122" height="25" valign="middle" bgcolor="#FFFFFF" align="left">
                                                                    <a href="<%=objRecordset("lien")%>" target="_blank"><input type="submit" value="Visualiser le dossier" name="visualiser_cas" style="background-color: #009999; color: #FFFFFF; border-style: solid; border-color: #FFFFFF">
                                  </a>
     
                                  </td>
                                </tr>
     
                                    </form>
                                  <tr>
                                  <td height="6" valign="top" colspan="2" align="left">
     
                                  </td>
     
                                  </tr>
    									 </table>
     <%                                   
    		objRecordset.MoveNext	'on place le curseur sur l'enregistrement suivant
     
    	Loop	'fin de la boucle
    	objRecordset.Close	'fermeture du curseur
    	Set objRecordset=Nothing	'destruction du curseur
    	objCnx.Close	'fermeture de l'objet de connexion
    	Set objCnx= Nothing	'destruction de l'objet de connexion
     
    end if	'fermeture de l'intruction IF
    %>
    Alors que dans la page cas pratique, alors que c'est la meme requête sauf le nom des champs change elle veut pas marché:

    Code : 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
    <%if Len(Request.Form("Cmd_semaine")) > 0 Then	'on test si la valeur du bouton Cmd_semaine est positif: si l'utilisateur a appuyé sur le bouton
    	dim objRecordset	'déclaration du curseur
    	dim objCnx	'déclaration de l'objet de connexion
    	set objCnx = dbConnect("BNW0001B" , "IUSR_BNW0001B" , "VF85DS" , "") 'l objet de connexion se connecte à la base de données.
    	set objRecordset=Server.CreateObject("ADODB.Recordset")	'le curseur est créer sur la base de données
     
       objRecordset.Open " SELECT num_cas , nom_cas , date_cas , commentaire, lien FROM PRATIQUE, PUBLICATION WHERE PUBLICATION.num_publication=PRATIQUE.num_publication ORDER BY date_cas DESC ", objCnx 	'requête permettant de sélectionner tout les enregistrements de la table JURIDIQUE et en les classant par ordre
       objRecordset.MoveFirst     'on place le curseur sur le premier enregistrement 
     
    	Do While Not objRecordset.EOF	'boucle qui permet de faire des instruction jusqu'a la fin des enregistrements.
    	 %>	
     
    								<table border="1" width="836" height="67">				
                                <tr>
                                                              <td width="495" height="23" valign="middle" bordercolor="#009999" bgcolor="#009999" align="left">
                                    <form method="POST" action="cas_pratique.asp" webbot-action="--WEBBOT-SELF--">
                                      <!--webbot bot="SaveResults" startspan
                                      U-File="_private/form_results.txt"
                                      S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
                                      bot="SaveResults" endspan i-checksum="43374" --><p><input type="text" name="Titre" size="84" value="	<%=objRecordset("nom_cas")%>" style="color: #FFFFFF; background-color: #009999; font-variant: small-caps; font-weight: bold; text-align: center; border: 0 solid #C0C0C0"></p>
     
     
                                  <td width="142" height="23" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center">
                                    <input type="text" name="date" size="11" value="<%=objRecordset("date_cas")%>" style="font-family: Arial; font-size: 10 pt">
     
     
                                </tr>
                                <tr>
                                  <td width="787" height="25" valign="middle" bgcolor="#C0C0C0" align="left">
                                                                    <p><input type="text" name="Corp" size="112" value="<%=objRecordset("commentaire")%>" style="background-color: #C0C0C0; font-family: Arial; font-size: 10 pt; text-align: left; border-style: solid; border-color: #C0C0C0"></p>
     
                                  </td>
                                  <td width="122" height="25" valign="middle" bgcolor="#FFFFFF" align="left">
                                                                    <a href="<%=objRecordset("lien")%>" target="_blank"><input type="submit" value="Visualiser le cas" name="visualiser_cas" style="background-color: #009999; color: #FFFFFF; border-style: solid; border-color: #FFFFFF">
                                  </a>
     
                                  </td>
                                </tr>
     
                                    </form>
                                  <tr>
                                  <td height="6" valign="top" colspan="2" align="left">
     
                                  </td>
     
                                  </tr>
    									 </table>
     
      <%                                   
    		objRecordset.MoveNext	'on place le curseur sur l'enregistrement suivant
     
    	Loop	'fin de la boucle
    	objRecordset.Close	'fermeture du curseur
    	Set objRecordset=Nothing	'destruction du curseur
    	objCnx.Close	'fermeture de l'objet de connexion
    	Set objCnx= Nothing	'destruction de l'objet de connexion
     
    end if	'fermeture de l'intruction IF
    %>
    l'erreur générée sur cette page est :

    Type d'erreur :
    Erreur d'exécution Microsoft VBScript (0x800A000D)
    Type incompatible: 'dbConnect'
    /juridique/cas_pratique.asp, line 86
    Promis c' est ma derniere erreur normalement merci de votre aide

  14. #14
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    107
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 107
    Points : 35
    Points
    35
    Par défaut
    C'est bon ça marche, merci à vous de m'avoir suivi tout au long de mon projet

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [MySQL] Erreur de requête
    Par Sebe dans le forum PHP & Base de données
    Réponses: 45
    Dernier message: 08/02/2006, 14h09
  2. [PHP MySQL] Erreur execution requête de type INSERT
    Par Pfeffer dans le forum Requêtes
    Réponses: 6
    Dernier message: 23/01/2006, 17h38
  3. [Debutant]Erreur Récurent - Requête
    Par ghan77 dans le forum Bases de données
    Réponses: 19
    Dernier message: 10/01/2006, 13h09
  4. erreur exécution requête
    Par MANU_2 dans le forum Bases de données
    Réponses: 4
    Dernier message: 13/10/2005, 07h27
  5. Erreur de requête :-(
    Par pekka77 dans le forum ASP
    Réponses: 2
    Dernier message: 28/06/2005, 13h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo