Firebird 2.1, ZTable data lost

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
SlavoF
Junior Boarder
Junior Boarder
Posts: 29
Joined: 12.02.2009, 15:31
Location: Nitra, Slovakia
Contact:

Firebird 2.1, ZTable data lost

Post by SlavoF »

Hi,
ZEOSLIB_TESTING_REV617 , D2009 , Firebird 2.1
Import data from paradox table into TZTable:
cashedupdates=false
autocommit=true
while not ImportTable.eof
...
ZTable.Append;
...
for I :=0 to ZTable.FieldCount-1
ZTable.FieldByName(FName).Value := FValue;
...
ZTable.Post;
...
All rows and fields are imported - Before1.jpg
if call ZTable.Refresh or ReOpen -> some data lost - After1.jpg

if run same procedure with
ZSQLProcessor1.Script.SetText('INSERT INTO ZTABLE VALUES ....);
ZSQLProcessor1.Execute;
All is OK
You do not have the required permissions to view the files attached to this post.
SlavoF
Junior Boarder
Junior Boarder
Posts: 29
Joined: 12.02.2009, 15:31
Location: Nitra, Slovakia
Contact:

Post by SlavoF »

after
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Did you try to add a tzsqlMonitor to your project to check what commands are sent to the server exactly? Where are the differences?

Mark
Image
SlavoF
Junior Boarder
Junior Boarder
Posts: 29
Joined: 12.02.2009, 15:31
Location: Nitra, Slovakia
Contact:

Post by SlavoF »

yes
You do not have the required permissions to view the files attached to this post.
SlavoF
Junior Boarder
Junior Boarder
Posts: 29
Joined: 12.02.2009, 15:31
Location: Nitra, Slovakia
Contact:

Post by SlavoF »

hmm ... ,
interesting
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

How's that file encoded? Doesn't look like plain ascii... I'll try to decode it later. Winmerge doesn't like it... (for comparison)

Mark
Image
SlavoF
Junior Boarder
Junior Boarder
Posts: 29
Joined: 12.02.2009, 15:31
Location: Nitra, Slovakia
Contact:

Post by SlavoF »

yet once
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi,

From a first look at the first log ('wrong') I have the impression you may have found som bug in the handling of prepared statements in combination with autocommit.
cat: Execute, proto: firebirdd-2.1, msg: SELECT a.RDB$RELATION_NAME, a.RDB$FIELD_NAME, a.RDB$FIELD_POSITION, a.RDB$NULL_FLAG, a.RDB$DEFAULT_VALUE, b. RDB$FIELD_LENGTH, b.RDB$FIELD_SCALE, c.RDB$TYPE_NAME, b.RDB$FIELD_TYPE, b.RDB$FIELD_SUB_TYPE, b.RDB$DESCRIPTION, b.RDB$CHARACTER_LENGTH, b.RDB$FIELD_PRECISION, a.RDB$DEFAULT_SOURCE, b.RDB$DEFAULT_SOURCE as RDB$DEFAULT_SOURCE_DOMAIN,b.RDB$COMPUTED_SOURCE as RDB$COMPUTED_SOURCE FROM RDB$RELATION_FIELDS a JOIN RDB$FIELDS b ON (b.RDB$FIELD_NAME = a.RDB$FIELD_SOURCE) LEFT JOIN RDB$TYPES c ON (b.RDB$FIELD_TYPE = c.RDB$TYPE and c.RDB$FIELD_NAME = 'RDB$FIELD_TYPE') WHERE a.RDB$RELATION_NAME = 'FIRMY' ORDER BY a.RDB$RELATION_NAME, a.RDB$FIELD_POSITION
cat: Execute, proto: firebirdd-2.1, msg: SELECT GEN_ID("FIRMY_ID_FIRMY_GEN", 1) FROM rdb$generators WHERE rdb$generators.rdb$generator_name = 'FIRMY_ID_FIRMY_GEN'
cat: Prepare, proto: firebirdd-2.1, msg: Statement 2 : INSERT INTO FIRMY (ID_FIRMY,OBCH_MENO,ICO,DIC,ICDPH,PREVADZKA,ULICA,MESTO,PSC,KODKRAJINY,KRAJINA,OKRES,REGION,UCET,KODBANKY,BANKA,TEL,FAX,MOBIL,EMAIL,WWW,KONTAKT,DOH_O_ZAST,IDENTJCD,IDENTJCD_KR,TIN_NCTS,TIN_NCTS_KR,ISTAT_SJ,ISTAT_TYP,CISLOOJ,PARTNER,CU_ID,CU_NAME,ZJED_PRIJ,ZJED_ODOS,POZNAMKA,ZMENA_DATUM,ZMENA_MENO,VISIBLE) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
cat: Bind prepared, proto: firebirdd-2.1, msg: Statement 2 : 1,' SA & KOVO - HALLA, s.r.o.',(NULL),(NULL),'SK2020208080',(NULL),'Ulica','Kostolište è.162','90062','SK',(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),0,(NULL),'SK',(NULL),(NULL),0,(NULL),'000',0,(NULL),(NULL),0,0,(NULL),(NULL),(NULL),1,
cat: Transaction, proto: firebirdd-2.1, msg: TRANSACTION COMMIT
cat: Execute prepared, proto: firebirdd-2.1, msg: Statement 2
cat: Execute, proto: firebirdd-2.1, msg: SELECT GEN_ID("FIRMY_ID_FIRMY_GEN", 1) FROM rdb$generators WHERE rdb$generators.rdb$generator_name = 'FIRMY_ID_FIRMY_GEN'
cat: Bind prepared, proto: firebirdd-2.1, msg: Statement 2 : 2,'A-HINSKE Warenhandels GMBH',(NULL),(NULL),(NULL),(NULL),'Sitterstiege 6','Coesfeld','48653','DE',(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),0,(NULL),(NULL),(NULL),(NULL),0,(NULL),'000',0,(NULL),(NULL),0,0,(NULL),(NULL),(NULL),1,
cat: Transaction, proto: firebirdd-2.1, msg: TRANSACTION COMMIT
cat: Execute prepared, proto: firebirdd-2.1, msg: Statement 2
The 'TRANSACTION COMMIT' statements that appear between the BIND and EXECUTE commands seems suspicious to me.
Did you try this with autocommit=false?
And a more difficult question : would it be possible to
- package a sample project that doesn't require Paradox. eg by copying from another Firebird table on a second connection or using a hardcoded array of data
- zip everything (=project without exe and full embedded server data+dll+...)
- send the zip file to zeoslib<at>gmail<dot>com

Mark
Image
SlavoF
Junior Boarder
Junior Boarder
Posts: 29
Joined: 12.02.2009, 15:31
Location: Nitra, Slovakia
Contact:

Post by SlavoF »

Hi,
autocommit=false not work
mail has been sent
thanks
Locked