Page 1 of 1

Firebird and AutoInc Value

Posted: Tue 22 Mar 2016 15:03
by HelgeLange
Hi there,

I'm struggling atm with an issue that I do have an auto-inc field and

El error aparece como "Refresh Failed. 0 records found"
Image

I searched all the forum and the problem appears to be that no change was found and that's a problem of the primary key.
So i configured the table with a primary, it looks like this now, but the error remains.
Image

The KeyField Id is configured as AutoInc and not required, as shown here :
Image

The database is firebird and the field has a trigger and a generator to create the autoinc value.
The dbmon tool shows queries where it looks for values with "where id is null", which makes no sense to me :p

If i open and close the table, everything works afterwards, but I guess that's not the general idea.
Any ideas what I'm doing wrong ? That problem is really annoying.

Thanks in advance for your help,
Helge

Re: Firebird and AutoInc Value

Posted: Wed 23 Mar 2016 09:39
by ViktorV
To return the value of an auto-incremental field generated on the server-side, you should set the TUniTable.DMLRefresh property to True. See more details about this property in the UniDAC help: https://www.devart.com/unidac/docs/?dev ... efresh.htm

Re: Firebird and AutoInc Value

Posted: Wed 23 Mar 2016 11:29
by HelgeLange
Thanks, Victor. That works like a charm.. but not in a thousand years I would have guessed the answer. :mrgreen:

Helge

Re: Firebird and AutoInc Value

Posted: Thu 24 Mar 2016 10:37
by ViktorV
It is good to see that the issue has been solved. Feel free to contact us if you have any further questions about UniDAC.