FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Date search in 17.05 problem
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Date search in 17.05 problem
Posted: Wed Jun 07, 2017 10:59 PM
Using the following code:

Code (fw): Select all Collapse
    // Create the browse
REDEFINE XBROWSE oLbxo  ;
    DATASOURCE oOrders  ;
    HEADERS " Done ", "Paid",  "Type", "W/O #", "Company", sLbl[4], sLbl[1], "Due Date", "Time",  " Started ", " Paid ", " Status " ;
    COLUMNS "ordnot", "Totals", "status", "wrkord", "ordcom","vehlic", "ordveh", "duedat", "duetim",  "wrkdat", "paydat", "CliUs1"  ;
    JUSTIFY  ,,2,2,,,2,2,2 ;
    ID 390 OF  oWdlg ;
    ON DBLCLICK ( tWorkorder():New( oOrders:WrkOrd ):FullEdit( ),  oLbxo:update(), aDis := LoadDispValues( aDis, oOrders ), oWdlg:update()) ;
        ON CHANGE ( aDis := LoadDispValues( aDis, oOrders ), oWdlg:update() ) ;
        UPDATE  

   oLbxo:aCols[ 1 ]:SetCheck( nil, .t. )
   oLbxo:aCols[ 2 ]:SetCheck( nil, .t. )
   oLbxo:aCols[8]:bClrStd := {|| { CELL_COL1( oOrders ), CELL_COL2( oOrders ) } }

   // Use for incremental search on opened database
    oLbxo:bSeek := { |c| oOrders:Seek( c )}


Using FWH 17.05, Harbour, MSVC 2017

The program uses a Database object in the browse. When set to a date field, typing in a date should move the view to the matching record. Instead we get the following message:

ADSCDX / 5095 The date specified in not valid. Date won't convert to Julian

This error results from a call to Database.prg line 958 ( seek ).

Is anyone else trying to do a search in a browse, using a database object, and getting this error.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Date search in 17.05 problem
Posted: Thu Jun 08, 2017 12:39 AM

Tim,

Are you implying that it was working in previous versions?

I don't think an incremental search will work on a date field because until the complete date is entered it cannot be converted to a date. You would have to index it on dtoc( date )) and also define the column as character.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Date search in 17.05 problem
Posted: Thu Jun 08, 2017 12:52 AM

I suppose I could do a popup search box to get the full date ... then implement it ...

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion