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:
Code: Select all
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)
);
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)^); )
Code: Select all
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;