Board index » delphi » BDE translate error on dbase date fields

BDE translate error on dbase date fields

Hello,

In an application i import some data from a dbase table created/modified
with a clipper app. (i use dbase iv table format)
In the data in the dbase table are some date fields, some empty, some not.
On empty date fields (when accessed programmatically via fieldbyname method
or when they recieve focus in a dbgrid) i receive the exception message
translate error , value out of bounds.
I look;s like the bde (5.01) is finding something (in an empty field), and
is not able to convert it to something usefull.
I tried some things but they did not work.
Does anyone know how to handle this problem, it;s quite annoying.

Thanks for any help and with the best wishes for 2000

Diederik van Donk

 

Re:BDE translate error on dbase date fields


On Thu, 30 Dec 1999 16:58:22 +0100, "Diederik van Donk"

Quote
<dh.v.d...@hccnet.nl> wrote:
>In an application i import some data from a dbase table created/modified
>with a clipper app. (i use dbase iv table format)
>In the data in the dbase table are some date fields, some empty, some not.
>On empty date fields (when accessed programmatically via fieldbyname method
>or when they recieve focus in a dbgrid) i receive the exception message
>translate error , value out of bounds.
>I look;s like the bde (5.01) is finding something (in an empty field), and
>is not able to convert it to something usefull.
>I tried some things but they did not work.
>Does anyone know how to handle this problem, it;s quite annoying.

Try looking at the table using a hexadecimal file viewer. In dBASE, DATE
type column data always takes up the same amount of space: eight
characters. Dates are stored in the format YYYYMMDD. NULL dates are stored
as eight spaces (hexadecimal 20, ASCII decimal 32). How are they stored in
that Clipper table? I suspect other than the format I described. If the
storage method is different, then you do not have a dBASE table (it
deviates from the dBASE specification on which the BDE depends).

One possible solution would be to access the table through an ODBC driver
capable of using Clipper tables.

Another would be a data translation utility capable of translating from
Clipper to true dBASE format.

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Steve Koterski              "Health nuts are going to feel stupid someday,
Felton, CA                  lying in hospitals dying of nothing."
                                                              -- Redd Foxx

Other Threads