AIDE ASP !!!

Salut

voila ... g une baz de donnée , g une table qui contient un numérique.... jusque la tout va bien ....

dans une page asp, je fais une requete j'ouvre mon recordset tout normal ... mais quand je fais un pauvr' test genre :

if (rs.fields("monchamps")=1) then
instructions

il me fais un caca tout mou en me disant :

Erreur d'exécution Microsoft VBScript error '800a000d'
Type incompatible

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. Hello

    c normal , il faut que tu castes ton champ en int pour le tester avec un nombre, ce qui nous donne:

    if ( Cint( rs.fields("monchamps") )=1 ) then
    instructions

    Voila voila

    CARO