The real problem is with xHarbour.
Harbour produces correct results.
For your information,
FWH does not have to do anything at all with this code
oRs:Fields( xx ):Value
// or
ValType( oRs:Fields( xx ):Value )
This code is entirely executed by the OLE functions of (x)Harbour.
So, the results will be the same, whichever version of FWH you use.
We can confirm this by executing this sample program both with Harbour and xHarbour.
This test is done on a Cloud server belonging to FW and all of us can connect to this server.
#include "fivewin.ch"
function Main()
聽 聽local oCn, oRs
聽 聽SET DATE ITALIAN
聽 聽SET CENTURY ON
聽 聽SET TIME FORMAT TO "HH:MM:SS"
聽 聽oCn 聽 := FW_OpenAdoConnection( { "MYSQL", "209.250.245.152","fwh","fwhuser","FiveTech@2022" }, .t. )
聽 聽if oCn == nil
聽 聽 聽 ? "Connect fail"
聽 聽 聽 return nil
聽 聽else
聽 聽 聽 ? "Connected"
聽 聽endif
聽 聽if FW_AdoTableExists( "ado_dates", oCn )
聽 聽 聽 oCn:Execute( "DROP TABLE `ado_dates`" )
聽 聽endif
聽 聽FWAdoCreateTable( "ado_dates", { ;
聽 聽 聽 { "FLD_CHAR", "C", 10, 0 }, ;
聽 聽 聽 { "FLD_DATE", "D", 聽8, 0 }, ;
聽 聽 聽 { "FLD_DTIME","T", 聽8, 0 } }, oCn )
聽 聽oRs 聽 := oCn:Execute( "SHOW CREATE TABLE `ado_dates`" )
聽 聽FW_MEMOEDIT( oRs:Fields( 1 ):Value )
聽 聽oRs:Close()
聽 聽oRs 聽 := FW_OpenRecordSet( oCn, "ado_dates" )
聽 聽oRs:AddNew( { "fld_char", "fld_date", "fld_dtime" }, ;
聽 聽 聽 聽 聽 聽 聽 聽{ "one", Date(), DateTime() } )
聽 聽XBROWSER oRs FASTEDIT
聽 聽? 聽"Compiler = " + Version(), ;
聽 聽 聽 "======================", ;
聽 聽 聽 "FLD_DATE", ;
聽 聽 聽 oRs:Fields( "fld_date" ):Value, ;
聽 聽 聽 ValType( oRs:Fields( "fld_date" ):Value ), ;
聽 聽 聽 oRs:Fields( "fld_date" ):Type, ;
聽 聽 聽 "----------", ;
聽 聽 聽 "FLD_DATIME", ;
聽 聽 聽 oRs:Fields( "fld_dtime" ):Value, ;
聽 聽 聽 ValType( oRs:Fields( "fld_dtime" ):Value ), ;
聽 聽 聽 oRs:Fields( "fld_dtime" ):Type
聽 聽oRs:Close()
聽 聽oCn:Close()
return nil
Results:
HARBOUR:
XHARBOUR:
I have not checked with later versions of xHarbour. Worth checking, if the issue is fixed in later versions of xHarbour.