Date search in 17.05 problem

Date search in 17.05 problem

Postby TimStone » Wed Jun 07, 2017 10:59 pm

Using the following code:

Code: Select all  Expand view
    // 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Date search in 17.05 problem

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Date search in 17.05 problem

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 68 guests