ftDate, ftDateTime - Problem

ftDate, ftDateTime - Problem

Post by Hercules Russa » Sun, 18 May 1997 04:00:00



I need to import data from a .DBF (Clipper) to a Ttable (.DBF), built
as follow:
.....
   Add('DT',ftDate,0,false);
 ...
   createtable;

To import the data, I use the follow code:
....
   destin.FieldByName('dt').asDateTime :=
lsource.FieldByName('dt').AsDateTime;

The code performs well. But, when I open the file, the BDE yelds the
follow error
message: 'translate error. Value out of bounds'.
I think that this occur due to restriction of the method
'fieldByName', that need
the type AsDateTime (30 caracters) and the destination field was built
with
type ftDate (8 caracters).
But, I need that this field really had type ftDate.
How to resolve this problem?

Hercules Russano
HRsoFT-"Simples, mas funciona!"
S?o Gon?alo-Rio de Janeiro-Brazil

 
 
 

ftDate, ftDateTime - Problem

Post by Larry Henge » Mon, 19 May 1997 04:00:00



> I need to import data from a .DBF (Clipper) to a Ttable (.DBF), built
> as follow:
> .....
>    Add('DT',ftDate,0,false);
>  ...
>    createtable;

> To import the data, I use the follow code:
> ....
>    destin.FieldByName('dt').asDateTime :=
> lsource.FieldByName('dt').AsDateTime;

> The code performs well. But, when I open the file, the BDE yelds the
> follow error
> message: 'translate error. Value out of bounds'.
> I think that this occur due to restriction of the method
> 'fieldByName', that need
> the type AsDateTime (30 caracters) and the destination field was built
> with
> type ftDate (8 caracters).
> But, I need that this field really had type ftDate.
> How to resolve this problem?

> Hercules Russano
> HRsoFT-"Simples, mas funciona!"
> S?o Gon?alo-Rio de Janeiro-Brazil


To transfer data from a DBF table with a Date field and an Interbase
table, I use the Database Desktop.  Worked great, and handled the TDate
to TDateTime translation.  That however, is not your problem.  There is
no need to translate between 2 DBF tables.  Both date fields should be
TDate types.

 
 
 

1. SQL & ftdatetime fields - must be a duh Q!

I want to do a SQL query with a datetime field.
But it keeps returning an empty dataset.

My problem is that I have the date I want to query in a
string, so I use this code:
floattostr(strtodatetime(thestring))

...so my SQL statement ends up like this:
select * from table where datefield = 728910
- and I used asDateTime to make sure that the data
in that field does indeed have that value...but my query
returns NOTHING!

Any ideas or comments please respond, thanx.

2. Error No -2147217900 instead of 50999 in VB

3. Problems, problems, problems

4. US-OH-ORACLE BACKEND DEVELOPER

5. problems problems problems

6. FM Problem - empty records - will not work - please help

7. SQL problem, MSDTC Problem or VB.NET problem?

8. is it tcl problem or pg problem?

9. Date and time problems (or BDE problem???)

10. Not just male problems but frustrating SQLMail problems.

11. SQL Problem: DISTINCT problem

12. datagrid problem or SQL problem?