Hello again:
PRINT DB.Subst("WHERE Name = &1 AND Date = &2", "Benoit", Now)
WHERE Name = 'Benoit' AND Date = '2006-02-15 11:51:33.043'

This is the given example for the DB.Subst. But what if the user has a
textBox input in which he can enter the search phrases divided by gaps
like: "Benoit .jpg Summer". I don't know what is going to be entered,
maybe the text will be: "Benoit .jpg this Summer". How to form a query
text using array ["Benoit",".jpg","this","Summer"] as words to be
included if I don't know the number of the words until the runtime? I
cannot foresee when will the array &1,&2,&3,...stop, so how could I
use DB.Subst which operates with a definite number of arguments?
I need something to intercept the problematic charactes before they
are submitted to DB.Exec, during the formation of search query text.
Do you understand my need? I'm not the one who've invented the ' signs
in English language but they are present in almost every title or
sentence.

Thank you!

Csaba

2012/1/23, M. Cs. <mohar...@gmail.com>:
> I'm sorry Benoit, but I didn't realized that in "You must use
> DB.Subst()" the You is me. I was thinking you are answering to Johnny.
> I'll give a try.
>
> Csaba
>
> 2012/1/23, Benoît Minisini <gam...@users.sourceforge.net>:
>> Le 23/01/2012 14:03, M. Cs. a écrit :
>>> Well, that was the thing I was fearing: I must handle the characters
>>> by my own. The strange thing is , that if I have something like
>>> DB.Exec("SELECT * FROM CATALOGS WHERE VName=&1","Blackmore's Night'")
>>> the query won't fail.
>>> I can even have query
>>> DB.Exec("SELECT * FROM CATALOGS WHERE VName LiKE&1","%'%")
>>> and the result won't fail. I wonder why? What's the advance in .Exec
>>> over .Quote?
>>>
>>> I will try Johnny's trick.
>>> Thanks!
>>>
>>> Csaba
>>>
>>
>> Did you read my mail?
>>
>> --
>> Benoît Minisini
>>
>> ------------------------------------------------------------------------------
>> Try before you buy = See our experts in action!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-dev2
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to