how to use ftAutoInc

how to use ftAutoInc

Postby san » Thu 27 Dec 2007 06:05

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
san
 
Posts: 1
Joined: Thu 27 Dec 2007 04:58

Postby Antaeus » Thu 27 Dec 2007 14:29

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.
Antaeus
 
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Postby balbaro » Sat 24 May 2008 11:08

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 ?
balbaro
 
Posts: 4
Joined: Sat 17 May 2008 15:14

Postby Antaeus » Mon 26 May 2008 07:08

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.
Antaeus
 
Posts: 2098
Joined: Tue 14 Feb 2006 10:14


Return to VirtualDAC