Hi,
You can also use a formatted search to auto generate the cardcode.
I this case you don't need an addon.
declare @TableKlantnr table (cardcode int)
declare @cardcode nvarchar(15)
insert into @TableKlantnr
select cast(cardcode as int) from ocrd
where cardtype = 'c';
select max(cardcode)+1 from @TableKlantnr where cardcode between 1019150 and 1150000
Regards
Ad