Re: METHOD SavePQQ() need "id" or how to use own PRIMARY KEY ?
Posted: Sat Aug 05, 2023 9:31 pm
hi,
using c:\fwh\samples\testpgre.prg i can open Table "CUSTOMER"
it work fine when "edit" but when try to APPEND it does crash
it have to do with
so Table should create with
---
i wonder how to "identify" a Record without UNIQUE "id"
in multi-User Environment 2 User can APPEND "same" at "same Time" so i can´t use Information like "First+Last" as "Key"
you need a PRIMARY KEY Type SERIAL where nextVal() ( NOT currval() ) is used when INSERT new Record
btw.
how can i make FIELD "id" as READ-ONLY when "edit"
using c:\fwh\samples\testpgre.prg i can open Table "CUSTOMER"
it work fine when "edit" but when try to APPEND it does crash
it have to do with
Sequence Functions like currval(), nextval() or even lastval() need Type SERIAL9.15. Sequence Manipulation Functions
so Table should create with
Code: Select all | Expand
cQuery += " CONSTRAINT " + xTable + "_pkey PRIMARY KEY ( ´serial´ )"
i wonder how to "identify" a Record without UNIQUE "id"
in multi-User Environment 2 User can APPEND "same" at "same Time" so i can´t use Information like "First+Last" as "Key"
you need a PRIMARY KEY Type SERIAL where nextVal() ( NOT currval() ) is used when INSERT new Record
btw.
how can i make FIELD "id" as READ-ONLY when "edit"