Subject Getting value back from SP
Author Dion
Hi,

Using the following SP(an extract)

ALTER PROCEDURE INSERT_BEN
(
MEMBEN_BENID INTEGER,
BEN_ID VARCHAR(15),
BEN_INITIALS VARCHAR(5),
BEN_FIRSTNAME VARCHAR(30),
BEN_SURNAME VARCHAR(30),
BEN_TITLEID SMALLINT,
BEN_HOMETEL VARCHAR(15),
MEMBEN_MEMBERID VARCHAR(15),
MEMBEN_RELATIVETYPEID INTEGER,
MEMBEN_OPTIONID INTEGER,
MEMBEN_FUNDID INTEGER,
)
RETURNS
(
BENID INTEGER
)
AS
BEGIN
BENID = :MEMBEN_BENID
IF (BENID IS NULL) THEN
BENID = GEN_ID( BENID_GEN, 1 );
INSERT INTO BENEFICIARY ( BENID
, ID
, INITIALS
, SURNAME
, FIRSTNAME
, TITLEID
, HOMETEL

VALUES ( :BENID
, :BEN_ID
, :BEN_INITIALS
, :BEN_FIRSTNAME
, :BEN_SURNAME
, :BEN_TITLEID
, :BEN_HOMETEL

INSERT INTO MEMBERBEN ( MEMBERID
, BENID
, RELATIVETYPEID
, OPTIONID
, FUNDID

VALUES ( :MEMBEN_MEMBERID
, :BENID
, :MEMBEN_RELATIVETYPEID
, :MEMBEN_OPTIONID
, :MEMBEN_FUNDID
END

in the InsertSQL section of a TIB_QUERY, I get the error that the BENID has
not been assigned a value.
Is this because Delphi does not know about the value generated on the
Server? If so, How do I assign it on the Client.

Regards,

Dion.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.314 / Virus Database: 175 - Release Date: 01/11/2002