>>Hi Hilmar,
>>
>>The application is already written, my task was just to write the orders import program to import orders from the mobile scanner. The problem I faced is that the tables have OrdNo, CustNo fields as PK (I assume), but how exactly they were generated I don't know. I'm afraid my introducing counters table (of course I started with the max numbers) may mess things up.
>
>I don't think adding an additional table will interfere with the other tables.
I think it may interfere with the application itself. I don't know how exactly they add new customers / orders. I searched the project before for OrdNo and I didn't find any insert command, so they may use APPEND BLANK and REPLACE. In this case the default() value is going to kick in and my number would be incrementing properly even if the application may insert wrong number.
But if the application will use INSERT command directly (or may be insert from memvar), in this case my counter would not be updated. This is what I'm afraid of.
If it's not broken, fix it until it is.
My Blog