EmulateAutoNumKey doesnt work with Alias tables

I have table Customers with IsIdentity Id field and EmulateAutoNumkey option. I add Alias table CustiomersAlias . Next i generate browse and form for both tables.
When I add new record to Customers table all work great.
When i add record to CustomersAlias tables in browse i get extra empty record. This seems that Clarion add record twice.
For alias tables setting options is not avaiable.
Any idea to correct this ? I use Clarion 9.1

What database driver is the table using?

I’m using MSSQL driver

This is a know problem.
If you take the code generated in the PreInsert method for the base table related to emulate auto number and paste it into the PreInsert method for the Alias table it should work.
AliasFileName{PROP:ServerAutoInc,1}=1 !Where 1 is the position of the auto-inc field.
This needs to be before the parent call.

1 Like