Re: Problem with TDateTime and ADO
- From: Yoni <yoni@xxxxxxxxxxxxx>
- Date: Mon, 03 Jul 2006 17:54:52 +0200
Oleg wrote:
Hi!the problem is when delphi / ODBC extract the parameters info they set it to adDate
I have some problem when we try to set field of timestamp type in Interbase database using TAdoQuery component. As result I can see updated field in database, but a value content only date without time-part. For connection I use Easysoft IB6 ODBC driver. It's a part of our code:
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOQuery1.SQL.Text :=
'update cheques set chargeddate = :chargeddate where chequeno = :chequeno';
ADOQuery1.Parameters.ParamByName('chequeno').Value := 12345;
ADOQuery1.Parameters.ParamByName('chargeddate').Value := now;
ADOQuery1.ExecSQL;
end;
Any ideas?
TO solve this problem you have to set the oleParameter to adDBTimeStamp like this
ADOQuery1.Parameters.ParamByName('chargeddate').ParameterObject.Type_ := adDBTimeStamp;
.
- Prev by Date: Re: Delphi DateTime is incompatable with SQL Server datetime.
- Next by Date: Re: TADOConnection error - connection string
- Previous by thread: Re: Delphi DateTime is incompatable with SQL Server datetime.
- Next by thread: How to change Transaction Isolation Level
- Index(es):