- First, I select all record from the table Components
- Then I check for an session variable called sv_sAction to be set at
"SearchComp".
- If this is set, I run queries if certain fields where filled in by a
form with the post method.
- Then, whatever I do, I allways get

Active4D error
Expecting a '<=' or a '#' or a '>='.
QUERY([User];[User]Code=Num(get session("lWebUserID")))

First of all, and I would like to remind everyone of this, please give full configuration information of your setup (4D/A4D version and OS) whenever you ask a question. It makes a difference.


My code that I described earlier;
`Let's check if the user had searched for something specific
ALL RECORDS([Component])
if (get session("sv_sAction")="SearchComp")
    if(defined($fsDNS))
        QUERY([Component];&;[Component]DNS="@"+String($fsDNS)+"@";*)
    end if
    if(defined($cbxMType))
        if(Not(Num($cbxMType)=0))
QUERY([Component];&;[Component]MainSystemTypeID=Num ($cbxMType);*)
        end if
    end if
end if

Where are you actually closing the query on [Component]? Both of the queries above end with *, so you have to issue one more query on [Component] without a *.

A few stylistic notes:

- It is easier (and preferred) to use session{"sv_sAction"} rather than get session("sv_sAction").

- I see you are using auto-created form variables. I recommend against using them. It is much better to use _form{"cbxMType"} and so on.

Regards,

   Aparajita
   Victory-Heart Productions
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoylibrary.com

_______________________________________________
Active4D-dev mailing list
Active4D-dev@aparajitaworld.com
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to