Group: Forum Members
Posts: 524,
Visits: 30K
|
I am using guid keys.
In a custom data source BO for a report I am putting a filter on a child cursor
Basically I want the filter to be "cclientkey =" and then the guid as a string - but of course in quotes
_policydisplay.SourceBO.Filter = "cclientkey = " & Me.ckey.ToString
doesn't work as the guid is not surrounded by quote in the resulting filter string.
I googled and tried things like
Dim quotes As Char = ChrW(34)
Dim filtstr As String = "cclientkey = " & quotes & Me.ckey.ToString & quotes
_policyDisplay.SourceBO.Filter = filtstr
Dim filtstr As String = "cclientkey = """ & Me.ckey.ToString & """"
_policyDisplay.SourceBO.Filter = filtstr
etc and no joy
Then reverted to the old Foxpro way
Dim filtstr as String = "cclientkey = '" & me.ckey.toString & "'" ( using single quotes to surround the guid )
and it works.
But a single quote to surround a string will throw and error. Is this some magic the old Foxers at Microfour have made possible? Never saw any solution like this in VB land? And what other ways are there to do this that work?
|