Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    Semplice Select Case che non va!

    Salve

    Praticamente ho una variabile (ricerca) che può assumere valori 1 e 2.

    Imposto il select Case in questo modo:

    SELECY CASE (ricerca)
    CASE "1"
    Response.Write("Caso numero 1")
    CASE "2"
    Response.Write("Caso numero 2")
    END SELECT

    Response.write (ricerca)

    Output = "1" (viene ignorata la select mi resituisce il valore iniziale).

    Qualcuno protrebbe venirmi incontro?
    Gentilissimi.

  2. #2
    Sto valore 1 o 2 della variabile ricerca da dove arriva?
    Da una form?

  3. #3
    SELECT CASE CSTR(ricerca)

  4. #4
    Prima faccio delle verifiche:

    if (IDscheda) = "" and q <> "" and (foto) = "" and (stato) = "" and (classe) = "" then
    ricerca = "1"
    ElseIf (IDscheda) <> "" and q = "" and (foto) = "" and (stato) = "" and (classe) = "" then
    ricerca = "2"
    end if

    Poi ci metto SELECT CASE

    Provato come dice Optime ma niente ancora!

  5. #5
    poi posta il codice *vero*

  6. #6
    if (IDscheda) = "" and q <> "" and (foto) = "" and (stato) = "" and (classe) = "" then
    ricerca = "1"
    ElseIf (IDscheda) <> "" and q = "" and (foto) = "" and (stato) = "" and (classe) = "" then
    ricerca = "2"
    end if

    SELECY CASE Cstr(ricerca)
    CASE "1"
    Response.Write("Caso numero 1")
    CASE "2"
    Response.Write("Caso numero 2")
    END SELECT


    Query n° <%=(ricerca)%>

  7. #7
    Originariamente inviato da Futurdesign
    if (IDscheda) = "" and q <> "" and (foto) = "" and (stato) = "" and (classe) = "" then
    ricerca = "1"
    ElseIf (IDscheda) <> "" and q = "" and (foto) = "" and (stato) = "" and (classe) = "" then
    ricerca = "2"
    end if

    Response.Write "Sono la Ricerca...: " & ricerca & "
    "


    SELECT CASE Cstr(ricerca)
    CASE "1"
    Response.Write("Caso numero 1")
    CASE "2"
    Response.Write("Caso numero 2")
    END SELECT


    Query n° <%=(ricerca)%>

  8. #8
    Optime grazie mi sono accorto che si era risolto già dal tuo primo aiuto!
    Gentilissimo.

    Ciao, Francesco.

  9. #9
    Originariamente inviato da Futurdesign
    Optime grazie mi sono accorto che si era risolto già dal tuo primo aiuto!
    Gentilissimo.

    Ciao, Francesco.
    optime!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.