Alright, just tried a little test on Ubuntu ( should be the same for any other 
platform also )

Yes, if after you alter the pk columns in the tables to be IDENTITY you run 
SHUTDOWN SCRIPT or SHUTDOWN COMPACT in the sql window, close Base and reopen it 
everything works just fine.

One final comment about this. The ALTER TABLE ALTER COLUMN command also has an 
option for setting the next value to use with an IDENTITY column, RESTART WITH 
<value>.

So let's say that you import a table with a column that will be the PK and you 
want this to be an auto_increment or IDENTITY. Keeping in mind that this is not 
the same as a guaranteed sequence you might have gaps in your values, ( 
1,2,3,8,11,12,14,20 ) this is fine, most likely it is just because you have 
deleted rows over time. But you want to be sure that base will not reuse any of 
those missing values . Here is what you do.

Assuming Table1 with column ID, with the values above.

First you entered
ALTER TABLE "Table1" ALTER COLUMN IDENTITY

(Optional ) now enter the command
ALTER TABLE "Table1" ALTER COLUMN RESTART WITH 21


Finish by entering
SHUTDOWN COMPACT

Close Base and reopen it - you should be good to go.

Let me know it that takes care of it for you, would you.

Drew

Reply via email to