| Thomas Holschen 2006-02-08, 11:23 am |
| ... or use a "stored procedure" aka function...
CREATE OR REPLACE FUNCTION hela_add_programm(pm
_programmname
"varchar")
RETURNS int4 AS
$BODY$ declare NewProgrammID integer;
Begin
select into NewProgrammID nextval('programm_id
programm_seq');
Insert Into programm(idprogramm,
programmname) values
(NewProgrammID,pm_Pr
ogrammname);
Return NewProgrammID;
end;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
--
____________________
____________________
_____
Hela Gewürzwerk Hermann Laue GmbH & Co.KG
EDV
Thomas Holschen
Beimoorweg 11
22926 Ahrensburg
Tel. : +49 4102/496-381
http://www.hela-food.de
____________________
____________________
_____
Mittwoch, 8. Februar
2006 um 15:03 in Nachricht
< 005601c62cb8$606b57d
0$1601a8c0@pcsistema
s>:[color=darkred]
> I am using VB6+ADO+ODBC with pgSQL.
> I need to obtain the value of a serial field (autogenerated)
inmediatly
> after I do a INSERT query. How can I do?
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn
Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte den Absender und löschen Sie diese E-Mail. Das unerlaubte
Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet. Aus
Rechts- und Sicherheitsgründen ist die in dieser E-Mail gegebene Information nicht
rechtsverbindlich.
This e-mail contains confidential and/or privileged information. If you are not the
intended addressee or have received this e-mail in error please notify the sender and
delete this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden. Due to legal and security reasons the information
contained in this e-mail is not legally binding.
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
|