Home > Archive > Clarion > January 2006 > AutoIncrement in TPS (CP 6.2)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
AutoIncrement in TPS (CP 6.2)
|
|
|
| Hi,
I have a program which runs now 7 years. Through this time, a few
tables would be convertet because of changes in the structure.
Now, a table (TPS) has since a year an auto increment (auto number)
property in the primary key. Today, a customer installed the new
version and make the conversion of the tables. All is OK. But when the
customer will insert a new record in the table with the auto number, an
error message will displayed, that the table has problems with auto
increments.
When I import the table in my database as TPS (new name), then in the
original table the property auto number is set, but in the new table,
which will converted today, the property auto number is not set.
What I must do for creating a converted table with auto number ?
It's very important, Thanks,
Roli
| |
| pblais@odstrategies.org 2006-01-24, 6:55 pm |
| The auto incrementing TPS KEY is not a function of the file
declaration it is a setting inside the Dictionary that is exported to
the template classes and the code to perform auto incrementing is
created.
In that sense no TPS file can be created as auto incrementing but the
program you make can make it happen.
This is why when you import the table to a DCT it is not auto
incrementing. It's not stored inside the table. Once imported you can
check the KEY attributes and change it to auto incrementing.
One error you can get is if there is a record in the table with the
primary key field set to zero. It really messes up the system. You may
need to manually delete it. If you have more than one auto key or the
auto key is not primary then you can also get the same related issue.
Given the table was originally not auto incrementing it is possible
that bad data is not preventing the key from working properly.
On 24 Jan 2006 04:43:33 -0800, "Roli" <info@protimer.ch> wrote:
>What I must do for creating a converted table with auto number ?
---------------------------------------
Paul Blais - Hayes, Virginia
| |
|
| Thanks,
I know, that the auto Increment mechanism is a internal function. But
it's not the error. It was the "Exclude when empty" in a other key.
Roli
| |
| pblais@odstrategies.org 2006-01-25, 6:55 pm |
| That will get you. If any part of the key is blank / null there is no
key record made. Not very good when you expect one to be there.
On 24 Jan 2006 13:33:21 -0800, "Roli" <info@protimer.ch> wrote:
> It was the "Exclude when empty" in a other key.
---------------------------------------
Paul Blais - Hayes, Virginia
|
|
|
|
|