Index key type ?

Index key type ?

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

Re: Index key type ?

Postby Enrico Maria Giordano » Thu Nov 14, 2013 8:30 pm

Tim,

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


Try

Code: Select all  Expand view
? VALTYPE( ORDKEYVAL() )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Index key type ?

Postby TimStone » 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
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 92 guests