Monday, December 5, 2016

HbDBU with HbQtScripts with SQL Implementation - 2nd December 2016

The latest version of HbDBU can be downloaded from 

This is a stand-alone executable which does not need any Qt libraries.

This version implements a sub-set of SQL query statement which is applied on any table opened with any rdd.

The SQL specific details are as such:

    + Added: FUNCTION __hbqtExecSelect( cFields, cFrom, cWhere, cOrder, cInto ) 
       which is activated with a statement like:

       SELECT first,last,age,state FROM c:\harbour\tests\test.dbf ;
       ORDER BY age-desc,state WHERE age>60

       #command SELECT FROM ;
                  [INTO ] ;
                  [ORDER BY ] ;
                  [WHERE <*whr*>] ;
              => ;
        __hbqtExecSelect( #, <"from">, #, #, <"into"> )

       preprocessor directive is sent with the script buffer automatically.

     ; Yes, you read it right. HbQtScripts now implement a sub-set of 
        SQL SELECT statement which is translated to database commands and 
        result is displayed via Browse(). Let us understand the difference
        in true SQL statement components vs HbQt.
         
        SELECT    * | comma sapartaed list of valid field names - no UDFs yet.

        FROM      fully qualified table name with path and extention. By default 
                  DBFCDX driver is used, but to use another driver prefix the 
                  table name with driver and "|", like:
                        dbfcdx|c:\harbour\tests\test.dbf
                  This must be the 2nd component of the statement.

        INTO      fully qualified table name with path and extention where 
                  results will be deposited. DBFCDX is used for this purpose.

        ORDER BY  a comma separated list of field names contained in the result
                  set. Keyword "-desc" can be post-fixed with a fieldname to 
                  present in descending order. In example statement as above 
                  it is represented as - age-desc,state - where the whole result 
                  is sorted descending on age first, then within each age group
                  state is sorted ascending.

        WHERE     This must be the last component of the statement.
                  The only operator supported for multiple conditions is 
                  "AND" only, like: age > 90 and last = 'Thomas'.
                  The supported operators within a single condition are 
                  >=, <=, !=, <>, =, <, >. 

                  A condition has 3 components
                  //
                  1. FieldName - must be present in the table
                  2. Operator  - one of the >=, <=, !=, <>, =, <, >
                  3. Value     - string 'Thomas', numeric 90.0, date '2016-12-02'

                  a '=' condition is looked for if any index starting with its 
                  FieldName is available or not. If available, then index order 
                  is set to it and seek is performed with Value part which 
                  greately enhances the speed.

    ; You can test it by simply placing the above SQL statement in a function 
      and just run it in console mode, assuming that test.dbf actually resides
      where it is pointed to.

      FUNCTION __test()

         SELECT first,last,age,state FROM c:\harbour\tests\test.dbf ;
         ORDER BY age-desc,state WHERE age>60

         RETURN NIL 


Looking for your critique and suggestions
Note that SQL dialect is so vast that it would be impossible to bring to Harbour, but effor is started...



Pritpal Bedi
a student of software analysis & concepts

Thursday, February 4, 2016

Harbour MiniGUI Extended Edition build 16.01 is published - 21st January 2016

Hi Friends,

I am glad to announce a new version of Harbour MiniGUI Extended Edition.

It is a regularly scheduled maintenance release.

The setup of the build 16.01 is published at the following URL:

http://hmgextended.com/files/CONTRIB/hmg-16.01-setup.zip

and the MinGW-based self-extracting archive is placed at the following URL:

http://hmgextended.com/files/CONTRIB/hmg1601-mingw.exe

There is the 64-bit MinGW-based self-extracting archive at the following URL:

http://hmgextended.com/files/CONTRIB/minigui64-1601.exe

There is also the extra xHarbour.org-based archive for this build at the
Minigui's homepage.

The changelog of this build is below:

2016/01/21: HMG Extended Edition version 16.01.
* Modified: Using of the C-function hb_vmPushNumInt() instead of hb_vmPushLong()
for proper 64-bit handling in the MiniGUI core.
Based upon a workaround of Przemyslaw Czerpak priv.onet.pl>.
Contributed by Dr. Claudio Soto <srvet@adinet.com.uy>.
* Updated: Modified the application manifest for compatibility with Windows 10.
A manifest file is common now for 32- and 64-bit builds.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see Windows7.Manifest in folder \Resources)
* Updated: HbSQLite3 library:
- update for using a recent SQLITE3 version 3.10.0.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
* Updated: Adaptation FiveWin Class TSBrowse 9.0 in HMG: 
- Fixed: Correction of the editable status in the method KeyDown.
Problem was reported by Dusko Radojcin.
Based upon a contribution of Janusz Pora <januszpora@onet.eu>.
* Updated: Harbour Compiler 3.2.0dev (SVN 2016-01-15 16:02):
* New: added HBFOXPRO library (see in folder \Harbour\Lib);
* New: added HBGZIO library (see in folder \Harbour\Lib);
* Updated: OpenSSL wrapper for using 1.0.2e version.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(look at ReadMe.txt in folder \harbour)
* Updated: HMGS-IDE v.1.3.0 Project Manager and Two-Way Visual Form Designer:
- fixed minor typo in the Image control definition.
Bug was reported by Pete Dionysopoulos <pete_westg@yahoo.gr>.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
* New: 'Vista Command Link Button' sample:
- Command Link Button control was defined as user component below:
@ , CLBUTTON OF ;
CAPTION NOTETEXT ;
ACTION [ ]
- added pseudo-OOP method SetShield for showing of the Admin
privilege requiring.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see in folder \samples\Advanced\CommandLink)
* Updated: 'Print Pie Graph' sample:
- updated the data for December 2015.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see demo.prg in folder \samples\Basic\GraphPrint)
* Updated: 'NirCmd Dll Usage' sample.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see in folder \samples\Advanced\NirCmdDll)
* Updated: 'Volume Info' sample:
- added a sample with using of the updated CallDll32 function.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see demo3.prg in folder \samples\Advanced\VOLUME_INFO)
* Updated: 'Windows Version' sample:
- fixed Windows 10 detection.
Contributed by Grigory Filatov <gfilatov@inbox.ru>
(see in folder \samples\Advanced\WinVersion)

This release is considered stable and ready for production use.

--
Best Regards,
Grigory Filatov
[MiniGUI Team]