[V4MD] AUTO INCREMENT?
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Nov 11 12:46:27 CST 2003
on 11/11/03 11:34 AM, Martin Kloss at martin.kloss at gmx.de wrote:
> At 04:46 11.11.2003, you wrote:
>> I come from a mySQL background. Is there a way in Valentina to simulate AUTO
>> INCREMENT ? I want to create primary key ids for each of my tables, and
>> have the
>> ids created automatically when I do an insert.
>
> You can always use the "RecID", which is automatically created for you.
> But it's important to know that a RecID will be recycled, so once you delete
> a record that RecID will be used for the next record.
>
> This is also important if you sort by RecID, because adding records then
> means that you will not get new records appended to the end of the list,
> obviously.
>
> If you need a field to sort by, which does not recycle values then you have
> to do it yourself. You can always create an integer "ID" field and get the
> max value before doing an insert or storing max value in a separate "settings"
> table in your db or store it somewhere else in a text file or wherever :-)
>
> I think an auto-increment field flag is targeted for 2.0, though. Ruslan?
Yes. In 2.0 we make this.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list