ZTable.InsertRecord fails without error XE7

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

ZTable.InsertRecord fails without error XE7

Post 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.
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: ZTable.InsertRecord fails without error XE7

Post by miab3 »

@amarryat,

Try to work with ZEOS 7.2 Revision3609.
http://svn.code.sf.net/p/zeoslib/code-0 ... sting-7.2/
In my opinion in XE7 it should work.

http://zeoslib.sourceforge.net/viewtopi ... 485#p37485

Michal
Last edited by miab3 on 30.01.2015, 09:09, edited 2 times in total.
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

Re: ZTable.InsertRecord fails without error XE7

Post 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?
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: ZTable.InsertRecord fails without error XE7

Post by miab3 »

@amarryat,
amarryat wrote:Is there an easy way to download those files?
Sure.
Any svn client.
For example, TortoiseSVN.

Michal
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

Re: ZTable.InsertRecord fails without error XE7

Post by amarryat »

Thank you!

I'll try it out and report back...
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: ZTable.InsertRecord fails without error XE7

Post 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
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

Re: ZTable.InsertRecord fails without error XE7

Post 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.
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: ZTable.InsertRecord fails without error XE7

Post by miab3 »

@amarryat,

Indeed, it does not work.
There have been considerable changes in Data.DB.pas in Delphi XE7.

Michal
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

Re: ZTable.InsertRecord fails without error XE7

Post 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.
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: ZTable.InsertRecord fails without error XE7

Post 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
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

Re: ZTable.InsertRecord fails without error XE7

Post 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.
amarryat
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 23.01.2015, 14:08
Contact:

Re: ZTable.InsertRecord fails without error XE7

Post 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;
Post Reply