Re: Rs.Filter = " Author = ' " & StrVariable & " ' " Dont work when StrV
It's just to demonstrate what meant by Steve :
Function ParseQuotes(sText as string ) as string
ParseQuotes = Replace(sText, "'", "''")
StrVariable = ParseQuoates(StrVariable)
Rs.Filter = " Author ='" & StrVariable & "'"
"Steve Stubbs" <email@example.com> wrote:
>The single quote in O'Donell is causing the filter property to fail. You
>must parse any text containing a single qoute (apostrophe) and substitute
>TWO single quotes for it. O'donell would become O''donell.
>"Williams" <firstname.lastname@example.org> wrote:
>>Rs.Filter = " Author = ' " & StrVariable & " ' " Dont work when StrVariable
>>is O'Donell for example
>>How a make this query?
>>If i use " in the filter property do not work
>>An error appear:
>>Arguments are of the wrong type, are out of acceptable range, or are
>>in conflict with one another.
>>I'm query a MSDE server (it's like SQL server 7.0 engine I´supose)
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL