I found a way to do, but I didn't understand what Benoit wanted:
If I have a query, I can always do the following:
Replace
"SELECT * FROM  CATALOGS WHERE VName=....."
with
"SELECT * FROM  CATALOGS WHERE " & DB.Subst("VName=&1",...) & "..."

That can solve the problem.
I'm sorry but something can be very obvious for you, and not so clear
to somebody not involved into Gambas! From the documentation I
couldn't tell what is the difference between the quotation used by
DB.Exec() and what's the gain from a function like  DB.Subst().
This is really a painfull point in the documentations.

Thanks anyway!
Csaba

2012/1/23, Caveat <gam...@caveat.demon.co.uk>:
> Why not just process one term at a time?
>
>
>   Dim conn As Connection
>   Dim termStr As String
>   Dim terms As String[]
>   Dim enteredTerm, escapedTerm As String
>
>   ...
>   conn = DataAccess.getConnection()
>   ...
>   ' Get termStr from the input box
>   'termStr = txtQueryInput.Text
>
>   ' Set termStr manually for testing
>   termStr = "abc def he's fill kill''d fine &1 %2 it's%"
>
>   terms = Split(termStr, " ")
>   For Each enteredTerm In terms
>     escapedTerm = DB.Subst("&1", enteredTerm)
>     ' do something with the escaped term...
>     ...
>   Next
>
> Kind regards,
> Caveat
>
>
> ------------------------------------------------------------------------------
> 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