Be sure to check these 3 new example apps; \examples\SqlScriptor\SqlScriptor.app shows usage of the new SQL scripting class, \examples\SQLite\School.app is the school.app modified to create an SQLite database (and tables) and to read the original .TPS files and copy the data into the SQLite database, and examples\XML\XMLParser – examples\XML\XMLGenerator which show a light-weight XML parser/generator.
Category Archives: Clarion 9
C9 – Dictionary Views
Clarion 9 offers a new “Advanced” view/layout to the Dictionary Editor. To switch to the Advanced view go to the Main Menu and choose Tools->Options->Clarion->Dictionary Editor Options, at the botton of the General tab change the ‘Quick View Type’ from Simple to “Advanced”.
Switching to the advanced view places all details in one combined view, like this:
C9 – FileCallBackInterface extended
You can now stop a file operation in the FileCallBackInterface.FunctionCalled method without an error being reported to the calling code. This is done by setting Parameters.StopOperation to TRUE. Using this feature you can, for example, have all CREATE statements execute SQL code instead of the standard code executed by the file drivers (could utilize the new SQLexecutor class and run your CREATE script). If ErrCode is not set, then no error code is returned to the calling code. FunctionDone will not be called if Params.StopOperation is TRUE.
The ABC FileManager class also has a new Property StopOperation. Setting this property to TRUE in PreDelete, PreInsert, or PreUpdate will cause the file operation to stop without reporting an error. Further, the matching PostXXXX method will not be called. If ErrCode is not set, then no error code is returned to the calling code. The matching PostXXXX method will not be called. if SELF.StopOperation is TRUE.
C9 – ABC
In the ABC classes/templates there is a new option to allow only one instance of a Procedure to be run . NB: This works when the ‘Call a Procedure’ is used from a Menu or Buttons, and the “START a new thread” is used.
Also added support to the WindowExtenderClass to ensure only one (1) instance of your executable is running. It checks if the process is already running and if so, it gives focus to the existing running process. And added support to the FrameExtension template to start the application only once (ABC and Clarion)
C9 – AppGen UI improvements
C9 – Trigger support extended
You can now add Create and Fetch triggers in the dictionary, and in the global embeds of a data app.
The Dictionary Editor Trigger Properties list has been extended to include:
Trigger Type ABC Method
- ——————————————————–
- Before Record Retrieval PreFetch
- After Record Retrieval PostFetch
- Before Create PreCreate
- After Create PostCreate
The following FileManager Methods have been added:
PreFetch PROCEDURE(SIGNED OpCode, KEY key, STRING positionBuffer, LONG pointer, UNSIGNED recLen, *CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL
PostFetch PROCEDURE(SIGNED OpCode, KEY key, STRING positionBuffer, LONG pointer, UNSIGNED recLen, *CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL
PreCreate PROCEDURE(*CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL
PostCreate PROCEDURE(*CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL
C9 – SQL improved with PROP:SQLRowSet
PROP:SQL parses the passed SQL and only sets things up for a return result if the SQL is a CALL or SELECT statement. It cannot always assume a result set as some backends (MSSQL in particular) do not work if you call UPDATE using calls that normally return a result set. PROP:SQLRowSet offloads the work of which type of calls to use to the developer. This allows calls that are not CALL or SELECT that return result sets (eg PRAGMA statement in SQLite), to work.
So we could write code like this:
SQLiteFile{PROP:SQLRowSet}=’PRAGMA table_list’ ! get the list of tables in the database
LOOP
NEXT(SQLiteFile)
…
END
or if using MSSQL
MSSQLfile{PROP:SQLRowSet} = ‘WITH q AS (SELECT COUNT(*) FROM f) SELECT * FROM q’
LOOP
NEXT(MSSQLfile)
…
END
C9 – PROP:LowResourcesHook
C9 adds a new SYSTEM property; PROP:LowResourcesHook, used to hook handling of post-processing of low system resources.
C9 – Redirection system
The redirection system now supports the built-in macro %libpath% in the Copy section of a redirection file. This macro evaluates to the directory where the .lib file is located when copying the matching .dll to the destination folder. The C9 default redirection file now includes the folder %libpath%\bin\%configuration% in the Copy section. This matches the structure used by Clarion.NET when you create a .lib file for a .NET assembly, thus making it very easy to add .NET assembly projects to your win32 solution.
C9 – Reports
New in C9 for reporting;
– Added Single File support to the HTML Report output generator
– ABC Reports: added an option to set the value used for page numbering the first page of the report
– ABC Report Preview: Added “Print Current Page” menu item to the previewer to print just the current page
– Added “Scan Copy” output mode for the PDF Report Generator