On Sat, Oct 22, 2011 at 1:33 PM, Felipe Monteiro de Carvalho
<felipemonteiro.carva...@gmail.com> wrote:
> ugh, any ideas how I can obtain the next sequence value using sqldb
> and postgres then?
>
> I have never used sequence values before, and while I am googling I
> only found either answers which are specific for a particular
> framework (java, djambo, whatever) or people claiming that it should
> generate the index automatically! o.O Which clearly it is not doing...
> I couldn't yet get a generic answer using SQL supported by Postgres,
> or whatever thing which I could reuse in sqldb.

You can use:
- Stored Procedures (SP): one for each table;
- "Dynamic SP": pass the generic SQL to the SP and return the scope_identity();
- GUID: Use a column to save a GUID. The real ID can be autoincrement
but you do not need it. You can found the register using the GUID.

Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to