Re: Test requete

From: Hans Kesting (news.2.hansdk_at_spamgourmet.com)
Date: 12/07/04


Date: Tue, 7 Dec 2004 13:26:11 +0100

Mickael Jouvin wrote:
> Hello,
>
> I have a problem with my test of requete (if rsTbl("Nom_produit") =
> null then %>
> <option value="1"> "Aucune réponse ne correspond à la requete"
> </option>) and i don' know why ?
>

It's probably not "null" but DbNull.Value.
If that is not the reason of your "problems", please specify (compile error,
runtime error, unexpected behaviour, ...)

> <select name="Nom_produit"
> STYLE="Width:300;font-family:Arial;font-size:10"> <% SET dbConn =
> Server.CreateObject("ADODB.Connection") 'Création de l'objet serveur
> MdbFilePath = Server.MapPath("Latorre.mdb") 'Connexion à la base de
> données mabase.mdb
> dbConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" &
> MdbFilePath & ";"
> SQL="SELECT Document.Nom_produit, Document.ID_produit FROM Document
> WHERE ID_fournisseur= " & request("Nom_fournisseur") & " AND
> ID_gamme= " & request("Nom_gamme") & " order by Nom_produit;"
> SET rsTbl = dbConn.Execute(SQL) %>
> <% DO WHILE not rsTbl.eof
> if rsTbl("Nom_produit") = null then %>
> <option value="1"> "Aucune réponse ne correspond à la requete"
> </option> <%else%>
> <option
> value="<%=rsTbl("ID_produit")%>"><%=rsTbl("Nom_produit")%></option>
> <% End if %> <% rsTbl.movenext
> LOOP
> SET rsTbl=nothing
> dbConn.close
> SET dbConn=nothing %>
> </select>
>
> Regards,
> Mikel



Relevant Pages

  • Re: PVOIID paramter in CreateTimerQueueTimer
    ... That gets rid of the compile error, ... other reason I could not retrieve the correct integer value was that I ...
    (microsoft.public.vc.mfc)
  • Re: Force wdPrintDocumentWithMarkup
    ... A macro like this should work in either version, ... The reason that code won't work in Word 2000 (at least it doesn't work ... for me) is because wdPrintDocumentWithMarkup looks like an undefined ... so I get the "Compile Error: ...
    (microsoft.public.word.vba.general)
  • is CArray, CComPtr&> possible?
    ... I want to have a declaration as follows: ... But VC++ 6.0 gives me a compile error: ... The reason is that there is a ATL function requires a parameter of address of CComPtr, but the operator & of CComPtr ...
    (microsoft.public.vc.mfc)
  • Re: is CArray, CComPtr&> possible?
    ... I want to have a declaration as follows: ... But VC++ 6.0 gives me a compile error: ... The reason is that there is a ATL function requires a parameter of address ...
    (microsoft.public.vc.mfc)
  • USE Statement
    ... I would like to the specify the USE argument dynamically as for example: ... the scalar is not recognized (compile error). ... I'm a new forum user. ...
    (perl.dbi.users)