This is a cross post from the forums: https://zeoslib.sourceforge.io/viewtopic.php?f=50&t=143299
Hey guys!
I was doing some tests with Zeos 8 SVN 7589 on Delphi 2010 and Firebird 4.0.0.2496 (relase). On firebird.conf I setted DataTypeCompatibility = 3.0 property. Here is the DML of the table on FB database:
CREATE TABLE PRODUCT ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1) NOT NULL, DESCRIPTION VARCHAR(60), PRICE NUMERIC(15,4) DEFAULT 0, CONSTRAINT INTEG_3 PRIMARY KEY (ID) );
I have an ZConnection (Conn) and ZQuery (qryProd) with default configurations.
Conn = TransactionLevel: tiReadCommited, Charset WIN1252
The below code is causing an access violation at line 1497 of ZDbcCache unit, it just happens on the second try:
( stCurrency: Statement.SetCurrency(StatementIndex, PCurrency(Data)^); )
procedure TForm1.Button1Click(Sender: TObject); begin if not Conn.Connected then begin Conn.Disconnect; Conn.Connect; end; if not qryProd.Active then begin qryProd.Close; qryProd.Open; end; with qryProd do begin Append; FieldByName('description').AsString := 'test ' + IntToStr(Random(100000)); FieldByName('price').AsCurrency := Random(1000); Post; end; end;
Note by Jan: This happens with the firebird and with the interbase driver: https://zeoslib.sourceforge.io/viewtopic.php?f=50&t=143299#p176579
A test and a fix have been checked in with [r7600]. Waiting for the reporter to confirm the fix.
Related
Commit: [r7600]