Problem with dbexpida30.dll (3.1.3) TSQLTimeStamp

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
andrecrp
Posts: 2
Joined: Mon 02 Jul 2012 10:32

Problem with dbexpida30.dll (3.1.3) TSQLTimeStamp

Post by andrecrp » Fri 13 Jul 2012 19:50

DbExpress Firebird - dbexpida30.dll
Problem with dbexpida30.dll TSQLTimeStamp the msecs and Delphi 2006.

TABLE

CREATE TABLE MOV (
     MOV_ID INTEGER NOT NULL,
     MOV_DATETIME TIMESTAMP NOT NULL
);

Data TABLE

MOV_ID MOV_DATETIME
     1 30/06/2012 23:59:59 999
     2 30/06/2012 23:59:59 999
     3 30/06/2012 23:59:59

View in DBGrid using TSQLConnection + TSQLDataSet (Select * from mov) + TDataSetProvider + TClientDataSet + TDataSource
MOV_ID MOV_DATETIME
     1 01/07/2012 <- INCORRECT
     2 01/07/2012 <- INCORRECT
     3 30/06/2012 <- CORRECT


Records MOV_ID=1 and MOV_ID=2 were increased to 01/07/2012, the record did not improve MOV_ID=3 date (30/06/2012) what is correct

What's the solution?

AndreyZ

Re: Problem with dbexpida30.dll (3.1.3) TSQLTimeStamp

Post by AndreyZ » Mon 16 Jul 2012 12:26

Hello,

I cannot reproduce the problem. I have used the following table:

Code: Select all

CREATE TABLE MOV (
     MOV_ID INTEGER NOT NULL PRIMARY KEY,
     MOV_DATETIME TIMESTAMP NOT NULL
);
INSERT INTO MOV
VALUES (1, '30.06.2012 23.59.59.999');
INSERT INTO MOV
VALUES (2, '30.06.2012 23.59.59.999');
INSERT INTO MOV
VALUES (3, '30.06.2012 23.59.59');
, and the following code:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  ClientDataSet1.Open;
  while not ClientDataSet1.Eof do begin
    ShowMessage(SQLTimeStampToStr('dd.mm.yyyy hh:mm:ss.zzz', ClientDataSet1.FieldByName('MOV_DATETIME').AsSQLTimeStamp));
    ClientDataSet1.Next;
  end;
end;
, and there were no problems with TSQLTimeStamp fields. Please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com . Also please specify the exact version of InterBase or Firebird server you are using.

andrecrp
Posts: 2
Joined: Mon 02 Jul 2012 10:32

Re: Problem with dbexpida30.dll (3.1.3) TSQLTimeStamp

Post by andrecrp » Thu 19 Jul 2012 12:17

I created a new database to reproduce the problem in version 2.5.1 of the Firebird, and most could not identify the problem, the tests showed that the problem was converted Firebird version 1.5 (backup 1.5 restore 2.5.1) to 2.5.1, to i did solve the problem replace the field, concluded that the problem was not the driver.

AndreyZ

Re: Problem with dbexpida30.dll (3.1.3) TSQLTimeStamp

Post by AndreyZ » Thu 19 Jul 2012 12:41

It's good to see that you've found a solution. If any other questions come up, please contact us.

Post Reply