#1 2016-08-22 15:00:38

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Change Autoincrement behavior

Hi Friends,


It's possible to change the way that the autoincrement values are generated?

I do not want the same id to be reused in case of exclusion of the last added record.

But SELECT MAX (ID) ... makes it reused.

I want to store the last id in a specialized table. And the values would be consulted in this table instead of using SELECT max...
It's possible?


Thanks in advance

Offline

#2 2016-08-22 20:10:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Change Autoincrement behavior

You can set the "ForceID=true" parameter to the Add() method, then include the ID to the record instance.

Offline

#3 2016-08-23 18:18:21

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: Change Autoincrement behavior

Thanks for reply.

Offline

Board footer

Powered by FluxBB