ClarionLive show notes for June 7 2013
Bob Z stopped in to say a few words about the upcoming CIDC. He mentioned the recent Argentine and Brazilian conferences which SV attended via webcam. Bob mentioned that SV will be covering the following topics:
- Clarion 9, which is in third party beta
- Clarion.NET with some simplified templates
- H5 (whether or not it retains that name
- Probably some demonstration of touch support
John and Bruce discussed the updated CIDC schedule; there was a presenter's meeting this week which resulted in some coordination between sessions; while each session will still stand alone there will be some development of themes during the conferences so sessions will to some degree also build on previous sessions.Â
Diego commented on how interesting the two South American conferences had been. There are many people upgrading to the new product in Argentina despite the economic situation there.Â
Check out the DMC training, and of course the NetTalk training on Monday and Tuesday before the main conference.Â
WebGem: John mentioned the free idera SQL fragmentation analyzer.
Word of the day: SQL, a statement that lets you use direct SQL code in filters, joins, and orders. That led to a lengthy and interesting discussion of the various SQL-related properties, as well as JOIN techniques.
Lisa's SQL conversion
Next Lisa brought up her app and the crew dealt with some SQL enhancements/issues, encountering significant problems changing a process filter statement. Eventually it became clear that the process template in question wasn't the Clarion process template but the CPCS process template, which does things a bit differently.Â
Mike came back from dealing with the A/C guy and explained that the best place to put a custom filter statement is in ThisProcess.ApplyFilter as
self.SetFilter('your filter')
I had a look at the template code that executes for the filter statement:
%ProcessObjectName.SetFilter(%(%StripPling(%RecordFilter)))
The code for this group is as follows:
#GROUP(%StripPling,%Incoming) #IF(SUB(%Incoming,1,1)='!') #RETURN(SUB(%Incoming,2)) #ELSIF(SUB(%Incoming,1,1)='=') #RETURN('EVALUATE(' & %StripPling(SUB(%Incoming, 2)) & ')') #ELSIF(UPPER(%Incoming)='TRUE' OR UPPER(%Incoming)='FALSE') #RETURN(%Incoming) #ELSIF(UPPER(%Incoming)='''TRUE''' OR UPPER(%Incoming)='''FALSE''') #RETURN(%Incoming) #ELSE #RETURN( '''' & QUOTE(%Incoming) & '''' ) #ENDIF
This translates as:
- if the first character is a ! then assume what follows is a variable
- if the first character is = then the filter is a string to be EVALUATEd
- True and False are special cases to be treated literally
- all other filters have any single quote characters doubled but are otherwise returned unchanged, within single quotes
Date conversions came up for discussion; if you're using a Clarion date or time you're going to need to convert that to something the SQL database understands.Â
Moving a process procedure to a single line SQL update statement provided an opportunity for John to show some nifty functionality in the UltimateSQL class, as well as further discussion of the various ways to approach rewriting Clarion code as SQL code.Â
Â
Â
Â