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

Reply via email to