Page 1 of 1
ZTable.InsertRecord fails without error XE7
Posted: 23.01.2015, 14:57
by amarryat
Inserting a record results in no record added. No error message.
The exact same code works in XE2.
No idea about the versions of Delphi between the two.
I'm using 7.1.4.
Tried this with both Firebird embedded and MariaDB, so I think it's a ZEOS bug.
Re: ZTable.InsertRecord fails without error XE7
Posted: 24.01.2015, 10:48
by miab3
Re: ZTable.InsertRecord fails without error XE7
Posted: 26.01.2015, 22:20
by amarryat
Is there an easy way to download those files?
I can click on them in the browser and they open up there, but is there a way to download the source?
Re: ZTable.InsertRecord fails without error XE7
Posted: 27.01.2015, 10:59
by miab3
@amarryat,
amarryat wrote:Is there an easy way to download those files?
Sure.
Any svn client.
For example, TortoiseSVN.
Michal
Re: ZTable.InsertRecord fails without error XE7
Posted: 27.01.2015, 16:14
by amarryat
Thank you!
I'll try it out and report back...
Re: ZTable.InsertRecord fails without error XE7
Posted: 28.01.2015, 10:24
by miab3
@amarryat,
You can also try "Download Snapshot" from:
http://sourceforge.net/p/zeoslib/code-0 ... sting-7.2/
ZEOS 7.2 (currently r3609) is a faster and corrected version ZEOS 7.1.4.
Michal
Re: ZTable.InsertRecord fails without error XE7
Posted: 28.01.2015, 22:49
by amarryat
Thanks - I grabbed the snapshot and installed it without any problems.
However this error hasn't been fixed. ZTable.InsertRecord still fails to insert a record, and doesn't report an error.
In addition, the deprecation warnings in ZComponent are still there. In ZAbstractRODataset.pas, there are two places where "DefaultFields" is used and should be replaced with TFields.LifeCycles.
Re: ZTable.InsertRecord fails without error XE7
Posted: 31.01.2015, 18:14
by miab3
@amarryat,
Indeed, it does not work.
There have been considerable changes in Data.DB.pas in Delphi XE7.
Michal
Re: ZTable.InsertRecord fails without error XE7
Posted: 04.02.2015, 15:43
by amarryat
Does this mean that we need to wait for an update from Embarcadero for Delphi, or is this a problem with ZeosLib?
Do you have any idea if/when this will be addressed?
Thanks.
Re: ZTable.InsertRecord fails without error XE7
Posted: 04.02.2015, 18:15
by miab3
@amarryat,
The problem with Delphi XE7 and ZTable.InsertRecord lies with the ZEOS.
For now, you can use the Append-Post or SQLInsert.
Michal
Re: ZTable.InsertRecord fails without error XE7
Posted: 09.02.2015, 15:29
by amarryat
Thanks.
I haven't tried SQLInsert - not sure where that is.
However I tried ZTable1.AppendRecord, and it too fails without error. Since the description of AppendRecord and InsertRecord are so similar in the Delphi help file, I'm going to guess that one of those functions calls the other.
Re: ZTable.InsertRecord fails without error XE7
Posted: 09.02.2015, 16:17
by amarryat
I may not have understood your post correctly. But I think you meant this, which is a workaround, and it worked. Thanks.
ZTable1.Insert;
ZTable1.FieldByName('mycolumn').AsString := 'my column value';
ZTable1.FieldByName(......
.....
ZTable1.FieldByName(......
ZTable1.Post;