Bob Pawley wrote:
The folks on the Delphi forum haven't been responsive to this question. Perhaps the ones that visit the forum don't know the answer. I have created a Delphi interface to a Postgresql table containing a serial column. When I try to insert a new value through the interface I get an error message that the serial field requires a value. When I remove the serial column the interface inserts a new value with no problem. When I insert directly via sql the serial column updates automatically. What am I missing to make this work through Delphi?
Try using DEFAULT as the serial value.. e.g; INSERT INTO foo VALUES (DEFAULT, 'Hello'); Where DEFAULT is the serial column. Sincerely, Joshua D. Drake
Bob
-- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match