Board index » delphi » Searching date and time fields in paradox

Searching date and time fields in paradox

Hello I have a strange problem  I keep running into in paradox. I am
using delphi 3.0 amd have a table with a secondary index for searching
for a string field, a date(paradox date) and a time (paradox time) value.
when I set the table index to this index and do a
table.find([station,date,time]); I get negative results.. Even when I
know the data is there?!?! What am I missing here? Would it be better to
use a timestamp? thanks  for any input

   --Frank

--
-------------------------------------------------------
Frank Crenshaw  fccre...@usgs.gov
Computer Specalist
USGS Grand Junction, CO (970) 245-5257 ext. 3018
 "If at first you don't succeed, skydiving is not for you"

 

Re:Searching date and time fields in paradox


I'm not familiar with the TTable.Find() method. TTable.FindKey()
searches for an *exact* match. If you are using "date" and "time" as
your parameters, which return the *current* date and time, it seems
unlikely that you will find an exact match in your database.
TTable.FindNearest() seems like it may work better for you.

Scott

Quote
Frank C. Crenshaw wrote in message ...
>Hello I have a strange problem  I keep running into in paradox. I am
>using delphi 3.0 amd have a table with a secondary index for
searching
>for a string field, a date(paradox date) and a time (paradox time)
value.
>when I set the table index to this index and do a
>table.find([station,date,time]); I get negative results.. Even when I
>know the data is there?!?! What am I missing here? Would it be better
to
>use a timestamp? thanks  for any input

>   --Frank

>--
>-------------------------------------------------------
>Frank Crenshaw  fccre...@usgs.gov
>Computer Specalist
>USGS Grand Junction, CO (970) 245-5257 ext. 3018
> "If at first you don't succeed, skydiving is not for you"

Other Threads