On Saturday 22 October 2011 17.33:11 Felipe Monteiro de Carvalho 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.
> 
> thanks,

Postgres documenatation is here:

http://www.postgresql.org/docs/manuals/
http://www.postgresql.org/docs/8.3/static/functions-sequence.html

MSEgui calls getsqlresult() with the statement
"
function tmsepqconnection.readsequence(const sequencename: string): string;
begin
 result:= 'select nextval(''' +sequencename+''') as res;';
end;
"
returns. Instead of the MSEgui getsqlresult() function use a tsqlquery in 
sqldb.

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

Reply via email to