StrataFrame Forum

Business Issue Filter Issue

http://forum.strataframe.net/Topic32615.aspx

By Danny Doobay - 6/5/2014

Hello,

When I have to filter BO, this code works fine until First Name has a single quote (For example o'reilly)

CustomerBO.Filter = "FirstName = '" & First_Name & "'"


What is the alternative?

By Danny Doobay - 6/5/2014

I found the answer:

First_Name.Trim.Replace("'""''")
replace single quote with two single quote.

By Edhy Rijo - 6/5/2014

Hi Danny,

Use the String.Format instead to set your filter condition, it is cleaner and work all the time.

CustomerBO.Filter = String.Format("First_Name = {0}", First_Name)
By Danny Doobay - 6/7/2014

Thank you.