SQL request in vCursor : "or"

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jan 6 11:56:01 CST 2005


On 1/6/05 11:48 AM, "Olivier" <vidal_olivier at yahoo.fr> wrote:

Hi Oliver,

1) I think Valentina turn SOME error code and SOME error string, yes?
Please always check them.


> Why this query it works more in Valentina 2 ?
> 
> t="string"
> cur=new vcursor(ctrlAdres.base,"SELECT nom FROM personne WHERE
> corbeille=false and (rep1="+t+" or rep2="+t+" or rep3="+t+" or
> rep4="+t+")",2,2,2)

It will be more useful to see the SQL String which you get
    BTW, you can EASY see SQL string you build in the V4RB_Log file.

So as far as I see you get

    ctrlAdres.base,"SELECT nom FROM personne WHERE
    corbeille=false and (rep1 = string or rep2 = string ....

I see mistake. You have forget single quotes around 'string'


> If I remove "OR", it works :
> cur=new vcursor(ctrlAdres.base,"SELECT nom FROM personne WHERE
> corbeille=false and (rep1="+t+")",2,2,2)

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina-beta mailing list