New FTDN August/Agosto 2016 (FWH 16.08)

New FTDN August/Agosto 2016 (FWH 16.08)

Postby Antonio Linares » Mon Sep 26, 2016 9:03 am

August 2016 (FWH 16.08)
=======================

* FWMYSQL: Many enhancements to be detailed in the forums

* New functions (source\function\valtostr.prg)

- FW_DT2STR( dDate/tDateTime )--> strDate/strDateTime
in format "YYYY-MM-DD" / "YYYY-MM-DD HH:MM:SS"
Useful for conversion to use with SQL

- FW_STR2DT( cDateStr/cDateTimeStr ) --> dDate / tDateTime
depending on the length and contents of the string.
Useful for conversion of output from some SQL

- UTC_TIMESTAMP( [tDateTime] ) --> tUtcDateTime

- Harbour provides functions HB_UTCOFFSET and HB_TStoUTC
FWH provided these function for xHarbour applications

* New: samples\dshow.prg shows how to take photos using
your webcam. This example only works with MS Visual
Studio Community 2015. To build it simply do:

FWH\samples\buildh32.bat dshow

* New: Xbrowse: When browsing Arrays, deleted records, if
any are collected in DATA oBrw:adeleted().

* Fix: XBrowse: RDDIncremental Filter results in runtime
error when dbf is in natural order. Fixed. In such cases
incremental field defaults to all fields (except memo fields)

* Enhancement: XBrowse: aCols parameter of MakeTotals() method
can now be specified as column names or numbers also.

* XBrowse(..) function now returns oBrw object.
XBROWSER command also is changed as #xtranslate.
oBrw := XBROWSER <clauses>
In case of MODAL usage, oBrw object is returned after
the dialog is closed. In case of NOMODAL usage the
object is returned soon after display of the browse.

* function FW_DbfToArray() in database.prg enhanced
The field list can contain "*" which means all fields.
Example:
USE STATES
cList := "*,RECNO()"
aData := FW_DbfToArray( @cList )
? cList // --> "CODE,NAME,RECNO()"

* New function DBFAPPEND() in database.prg
Automatically recycles deleted records in case of
DBFCDX RDD and if index on "DELETED()" is availble
by name "DELETED"

* Enhanced: function FW_FieldsPut( aFields, aValues, ;
nLockWaitSecs, lAppend/nRecNo, bTrigger ) in database.prg

4th param: If logical .T. indicates Append and .F.
indicates replace current record.

This param can now be a number also. If numeric, changes
are made to the record number specified and also Recalled
if the record is already deleted and if the record does
not exist ( 0 or > lastrec() ) then a new record is appeneded.

If the list of fields contains the expression "RECNO()", this
value is used in the same way as above.

* New FW_SaveArrayToDBF( acFields, aData )
This function works complimentary to FW_DbfToArray() if
one of the fields names in the list is RECNO().
Example:
cList := "*,RECNO()"
aData := FW_DbfToArray( @cList )
oBrw := XBROWSER aData FASTEDIT SETUP ( ;
oBrw:cHeaders := FW_ListAsArray( cList ), ;
ATail( oBrw:aCols ):lReadOnly := .t. )
Edit the data and then
FW_SaveArrayToDBF( cList, aData )

* Fix: TDataRow class (datarow.prg)
Method FieldName( nLastFieldNumber ) returns an empty string.
Fixed.

* TDataRow: When bEdit is evaluated, the workarea of the record
is selected for the duration of the edit.

* Enhancement: function PopupBrowse() now supports an optional
fourth parameter to specify the column value of the browse
that we want to be returned. By default it is 1. Please review
samples\yunus.prg

* Enhancement: function PopupBrowse() now works on windows too,
besides dialogs and xbrowses.

* New: samples\yunus.prg is a complete invoicing app that you
can use as a template for your apps. It shows how to use the
function PopupBrowse() from GETs in dialogs and from XBrowses

* Fix: Method Redefine Class TRichEdit5

* Fix: dtpicker.ch was supplying wrong parameters to the ON CHANGE
clause. Now it is ok. Thanks to Biel!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN August/Agosto 2016 (FWH 16.08)

Postby Antonio Linares » Wed Oct 12, 2016 9:14 am

October 2016 (FWH 16.08 Revised Build)
======================================

* XBrowse: bPastEof is now evaluated with browse
object as paramter

* FWMARIADB:

RowSet object
-------------
1) New: Pagination
When a RowSet is opened with syntax
RowSet( table/sql, nRows ), in addition to the existing
methods oRs:ReadNext( [nMoreRows] ), which expand
the rowset with new rows, now it is alsp possible to
switch pages. PageSize defaults to the number or rows
specified while opening the rowset, which can be changed
later in the program.

DATAS nPageStep, nCurrentPage, nMaxPages
METHOS FirstPage(), PrevPage(), NextPage(), LastPage(),
GoToPage( nPage )

These datas and methods are self-explantory.

It is also possible to alternate the usage of paging
and ReadNext() methods.

2) New DATA lAutoAppend INIT .f.
If set to true, XBrowse created after setting the value
to true appends blank record when down arrow is pressed
on the last row or when last column is editied in fastedit
mode. This inline append facility can be used in xbrowses
with fastedit. There is no extra code required for this
except setting the flag to .T. before creation of xbrowse.

3) New METHOD EditBaseRecord( [cFieldList], [lNew], [bEdit] )
It is possible that only some fields are read into the RowSet
and for editing alone, we may need to edit all the fields
(or more fields than included in the rowset). Normally that
would require opening another rowset for that record with
all fields and editing that rowset. Even in that case,
current rowset is not updated with these changes. A requery
is required which makes the process slow.
In such cases, EditBaseRecord() can be used. Any changes made
with this method are synced with the current rowset
automatically.

Example:
oRs := oCn:RowSet( "SELECT CONCAT_WS( ', ', FIRST, LAST ) AS NAME," + ;
"CITY,SALARY FROM CUSTOMER" )
oRs:EditBaseRecord() // can edit all fields of customer table
and the changes are automatically
reflected in the current rowset.

Connection Object
----------------
1) New METHOD Explan( cSql, [lShow = .t.] ) --> lValidSQL
By default, this method displays the execution plan of the
sql statement and returns if the sql statement is valid or
not.
This is useful to study the possibility of further optimizing
execution of sql statement as well as determining the validity
of sql statement without executing.

2) New METHOD IsBinaryField( cTable, cField ) --> lIsBinary
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 4 guests