Subject Re: [firebird-support] Stored Procedure for Insert
Author Martijn Tonies
Hi Marc.

>>>>>>>>>Please don't "top post".

> My problem is: I don't want to have a break in the numbers
(1,2,3,4,8,9,10, ...).... that's not good. But if a INSERT statement fails,
I will have a break.
>

What's the problem with the breaks?

> That's why I wanted to use MAX.

You can use MAX, but then you have to have some kind of
locking mechanism around the steps.

1 - lock
2 - do max
3 - maxvalue + 1
4 - insert into
5 - unlock

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com