insert datetime field losting time-part
- From: mqe@xxxxxxxxxxxx
- Date: 24 May 2005 09:35:37 -0700
Hi for all.
I'm using Delphi7 Interprise, TADOQuery, InterSystems Caché Database.
When I try insert one record using:
Query: TADOQuery;
Query.sql.text := 'insert into tableA( fieldA ) values ( ? )';
Query.parameters.clear;
Query.parameter.CreateParameter( 'Param1', ftDateTime, pdInput, 0,
NULL );
Query.parameter.items[0].value := '2005-05-05 14:32:32';
Query.ExecSql;
I lost the time part and it insert: 2005-05-05 00:00:00.
If I use:
Query.sql.text := 'insert into tableA( fieldA )
values ( " 2005-05-05 14:32:32 " )';
It work.
If I use:
Query.parameters.Refresh, It work.
It seems the CreateParameter don't work to DateTime fields.
Can anyone help me?
Sorry for my bad english.
Thanks in advance.
Mauricio.
.
- Prev by Date: Re: Need ODBC Jump Start
- Next by Date: Re: Finding a record in a TADOTable
- Previous by thread: Finding a record in a TADOTable
- Next by thread: Can you bypass ADO and pass SQL straight to Oracle?
- Index(es):