I have a web application that uses delphi / interbase
When you press the 'NEW' button,
The table is opened
A new record is inserted (blank)
The table is posted
The table is closed
A tranasaction commits the data
After this an interbase generator gives the record a unique ID
The application sends the table to the end (so that it can read the unique ID that was assigned to the new record you just created- as it needs to know this)
Now this was working fine, but now something has gone wrong.
When you insert a new record it sticks it in a completly random place in the database.
For example, imagine we have a table with records numbered from 1 to 501.
Press new, a blank record is inseted etc etc (which has the uniqueID 501)
When the table then seeks to the end so that it can read back the value of 501, it instead finds 500 at the end.
Eventually I spotted that interbase was sticking 501 in a completely random place in the database, and it now does this every time
eg, the records may run like this
Why on earth is it doiing this? Any idea how to stop it? It is strange as it worked fine for a while now it always does this. Also I have recreated the same fault on 2 computers (i.e. it works fine for ages then suddenly start inserting randomly)
If there is no way to gaurantee that the new data will be inserted at the end, then is there a way that I can create a new record, number it, and then tell delphi what the number of the record is without having to do what I am doing?
Thanks in advance for your help