Page 1 of 1

Two problems inserting into firebird DB

Posted: 03.07.2009, 08:14
by duzenko
procedure TZAbstractRODataset.SetStatementParams, line 1015

Code: Select all

        case Param.DataType of

          ...

          ftCurrency:
            Statement.SetBigDecimal(I + 1, Param.AsCurrency);
should be "ftCurrency, ftBCD" because currency fields remain NULL otherwise

Did anyone test inserting time values (in delphi, it is double less than 1.0)? I try to record time to a string field and I get date recorded, obviosly because there is no Variant type of time, but only date (I mean TVarRec.VType)

Posted: 04.07.2009, 11:34
by seawolf
I used several times time field format, so I think somthing you are doing is not correct. Regarding BCD, if I remeber well is not fully supported yet.

Anyway we need more info .. I mean the firebird field where you want to write a time , and a sample of a procedure which does not work

Posted: 06.07.2009, 13:26
by duzenko
seawolf,

I use TZQuery "insert into Table1 (saletime) values (:saletime)" + Params[0].Value := MyTime.

MyTime is of type variant in that part of code
Field saletime is varchar

Posted: 08.07.2009, 22:22
by mdaems
Hi Seawolf,

I have a very rough patch in my working copy which adds basic support for Bcd and BcdFmt values. Are you interested in getting the patch and completing it?

Mark