FWH 17.05 (revised build) provides an easy compatibility with XBrowse including inline editing and also provide some utility functions.
This does not require any changes to the (x)Harbour libraries.
Simply link your pgsql.lib (xHarbour) or hbpgsql.lib (Harbour) and implib libpq.lib along with your FWH application and go.
It is also very easy to create Unicode applications. Create database with utf8 character set and set FW_SetUnicode( .t. ). The application is now fully Unicode compatible.
Example:
- Code: Select all Expand view RUN
oServer := TPQServer():New( host, db, user, password )
if oServer:NetErr()
? oServer:ErrorMsg()
QUIT
endif
if .not. oServer:TableExists( "customer" )
FWPG_ImportFromDBF( oServer, "c:\fwh\samples\customer.dbf" )
endif
cSql := "select * from customer"
oQry := oServer:Query( cSql )
XBROWSER oQry FASTEDIT AUTOSORT TITLE "POSTGRE SQL"
oQry:Destroy()
oServer:Destroy()
return nil
Supported: Inline edit, autosort, incremental seek and wildseek, Edit dialog
Not supported: Incremental filters, appends.
There are many further improvements in FWH 17.06, including support for binary data (images) and more.
Example:
- Code: Select all Expand view RUN
if .not. oServer:TableExists( "customer" )
FWPG_ImportFromDBF( oServer, "c:\fwh\samples\wwonders.dbf" )
endif
cSql := "select * from wwonders"
oQry := oServer:Query( cSql )
XBROWSER oQry FASTEDIT TITLE "POSTGRE SQL IMAGES" ;
SETUP ( oBrw:lCanPaste := .t. )
Test by copying an image file from file explorer and then clicking Ctrl-V on the image cell in xbrowse.
Replacing image: oCol:VarPut( memoread( <imagefile> ) )
Basic (hb)pgsql library supports only limited data types. FWH extends support for byinary (bytea) and timestamp datatypes.
Basic (hb)pgsql library also can not modify sql with aliased field names and join queries. FWH adds that support.
FWPG_Structure( oQry ) --> Extended structure info.
Users of FWH 17.05, if interested in testing the latest features, can obtain latest libs on request.