FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Index key type ?
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Index key type ?
Posted: Thu Nov 14, 2013 07:29 PM

Is there a function that will tell us the data type for an index ?

I have a search function ( generic ). It receives a list of search titles, and the corresponding index names. It also has a box to enter a starting value, and then it performs a soft seek.

All works fine except dates. Dates are placed in the box as a string value but the index is in date order. I need to detect an index that is on a date field so I can add code to convert that type of string to a date equivalent for searching.

I can do it the "long way" but that takes a lot of extra coding in the program. So, if a function is available, that would be nice.

If not, then I can create a solution ..

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: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Index key type ?
Posted: Thu Nov 14, 2013 08:30 PM
Tim,

TimStone wrote:Is there a function that will tell us the data type for an index ?


Try

Code (fw): Select all Collapse
? VALTYPE( ORDKEYVAL() )


EMG
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Index key type ?
Posted: Thu Nov 14, 2013 10:18 PM

Thank you. That works perfectly.

Tim :D

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