all groups > vb.net data > february 2004 >
You're in the

vb.net data

group:

String expression problem


Re: String expression problem Jay B. Harlow [MVP - Outlook]
2/16/2004 5:58:23 PM
vb.net data: John,
Have you considered:

[quoted text, click to view]
Me.txtCompany.Text.Replace("'", "''") & "*' "

That's replace a single quote with two single quotes.

Hope this helps
Jay

[quoted text, click to view]

String expression problem John
2/16/2004 11:45:36 PM
Hi

I am using the following string for a dataview expression;

dv.RowFilter = "Company like '*" & Me.txtCompany.Text & "*' "

The problem comes when txtcompany field contains an apostrophe such as
"O'Neil Associates", and the app crashes. How can I get round this problem
i.e. be able to filter even with an apostrophe?

Thanks

Regards

AddThis Social Bookmark Button