Page 1 of 1

how to use ftAutoInc

Posted: Thu 27 Dec 2007 06:05
by san
Hi Dear....
I have any trouble with virtual table..
if use ftAutoInc why not auto like as MySQL Field Auto Increment!!
I was try to change propeties and not meet solution for that!!
may be any body can tell me how to use ftAutoInc like MySQL Field!!
thank's

Posted: Thu 27 Dec 2007 14:29
by Antaeus
Values for auto increment fields are generated by MySQL server. TVirtualTable does not support such functionality. You can add a handler to the BeforePost or AfterPost event of TVirtualTable. This handler will calculate and insert required values.
Fields of ftAutoInc type.

Posted: Sat 24 May 2008 11:08
by balbaro
How do you program such a handler please ? , to be sure always having a unique number on later adding or deleting of records.



I am a newbie to databases...


Then something else, how does one use Locate to retrieve multiple records wich have a certain value ?

Posted: Mon 26 May 2008 07:08
by Antaeus
balbaro wrote:How do you program such a handler please ? , to be sure always having a unique number on later adding or deleting of records.
TVirtualTable does not support support such kind of constraints. You can add this ability manually using events of TVirtualTable.
balbaro wrote:Then something else, how does one use Locate to retrieve multiple records wich have a certain value ?
You should call multiple times the LocateEx method passing lxNext in options.