-
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, "'", "''")
End Function
Sub Demo()
....
....
StrVariable = ParseQuoates(StrVariable)
Rs.Filter = " Author ='" & StrVariable & "'"
....
....
End Sub
SLJ
"Steve Stubbs" <stevestubbs@hughesautomation.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.
>
>Steve
>
>
>"Williams" <apterous@hotmail.com> 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:
>>
>>Err 3001
>>
>>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)
>>
>>Thank.
>>Williams
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks