[fpc-pascal] Re: How to insert a record and get the primary keywith sqldb?
Ludo Brands
ludo.brands at free.fr
Sat Oct 22 21:38:18 CEST 2011
> Error: <b>Preparation of query failed. (PostgreSQL: ERROR:
> column "GameSession_SessionId_seq" does not exist LINE 1:
> prepare prepst2 as SELECT nextval("GameSession_SessionId_se...
>
> SQLGameSession.SQL.Text:='SELECT
> nextval("GameSession_SessionId_seq") as res;';
Nextval takes a regclass as parameter, not an identifier (column). So, use
single quotes: SELECT nextval('GameSession_SessionId_seq') as res;
Ludo
More information about the fpc-pascal
mailing list