i have Problem with "existing" PostgreSQL Table when use with Fivewin
it seems to work only when FWPG_ImportFromDBF() DBF Data using "Fivewin Way" where FIELD "ID" was add
FIELD "ID" is used as PRIMARY KEY and work "autoincrement" but METHOD SavePQQ() use currval() AFTER (!) INSERT when APPEND
so Fivewin Sample c:\fwh\samples\testpgre.prg FAIL when try to APPEND new Data
---
i have learn to use Nextval() when APPEND Data to Table but TABLE must be create using
- Code: Select all Expand view
- cQuery += " CONSTRAINT " + cTable + "_pkey PRIMARY KEY (__record)" // "__record" == "ID"
when "edit"
cPreText := "INSERT INTO " + cTable + " VALUES("
and when APPEND add
- Code: Select all Expand view
- // use nextval() for Sequence !
cIns += "nextval('" + cTable + "___record_seq')" // "___record_seq" == "ID_seq"
---
there is FUNCTION FWPG_PrimaryKeys() in c:\fwh\source\function\pgsuport.prg
in same PRG are (working) static function GetSerialCol() which is not used ( WHY ? )
i have search for
FWPG_XBrSaveData()
SetPostGreCol()
SetPostGre()
XbrwSetDataSource()
but found no Sample how to use it
so what do i miss and how to use same PostgreSQL Table create by Xbase++