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
Firebird 2.1, ZTable data lost
Moderators: gto, EgonHugeist, olehs
Firebird 2.1, ZTable data lost
You do not have the required permissions to view the files attached to this post.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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.
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
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.
The 'TRANSACTION COMMIT' statements that appear between the BIND and EXECUTE commands seems suspicious to me.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
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