Subject | RE: [ib-support] mysterious error 335544347 |
---|---|
Author | Alan McDonald |
Post date | 2002-09-30T17:20:44Z |
you say the message referes to obj_id but you are changing the field
cls_id - is this a typo?
also does your sp in
SELECT * FROM search_or_insert_rsp (:param_id, :user_count) INTO :new_uhi;
return a singleton select?
why aren't you using the field name instead of *
it sounds like :new_uhi is the suspect null value
why don't you assign a default for it?
Alan
-----Original Message-----
From: Uwe Sander [mailto:usander@...]
Sent: Tuesday, 1 October 2002 3:00
To: ib-support@yahoogroups.com
Subject: [ib-support] mysterious error 335544347
Hi,
we have trouble with the following procedure:
ALTER PROCEDURE INSERT_NEW_THEME (
THM_NAME VARCHAR(128),
CLASS_ID SMALLINT,
OBJ_ID INTEGER,
PARAM_ID INTEGER,
USER_COUNT INTEGER)
RETURNS (
NEW_ID INTEGER)
AS
DECLARE VARIABLE NEW_UHI INTEGER;
BEGIN
new_id = gen_id (gen_thm_id, 1);
INSERT INTO thm (id, name) values (:new_id, :thm_name);
SELECT * FROM search_or_insert_rsp (:param_id, :user_count) INTO
:new_uhi;
INSERT INTO guilt (thm_id, cls_id, obj_id) values (:new_id, :class_id,
:obj_id);
INSERT INTO guilt (thm_id, cls_id, obj_id) values (:new_id, 2,
:new_uhi);
suspend;
END
The error mentioned in the subject line occurs, complaining that the value
for
the field 'obj_id' would be NULL. We are sure that this is never the case
and
the error disappears if we modify the line before 'suspend' to:
INSERT INTO guilt (thm_id, cls_id, obj_id) values (:new_id, cast (2 as
SMALLINT), :new_uhi);
Indeed, the column cls_id is defined as SMALLINT, but is this cast really
necessary?
Thanks
Uwe
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
cls_id - is this a typo?
also does your sp in
SELECT * FROM search_or_insert_rsp (:param_id, :user_count) INTO :new_uhi;
return a singleton select?
why aren't you using the field name instead of *
it sounds like :new_uhi is the suspect null value
why don't you assign a default for it?
Alan
-----Original Message-----
From: Uwe Sander [mailto:usander@...]
Sent: Tuesday, 1 October 2002 3:00
To: ib-support@yahoogroups.com
Subject: [ib-support] mysterious error 335544347
Hi,
we have trouble with the following procedure:
ALTER PROCEDURE INSERT_NEW_THEME (
THM_NAME VARCHAR(128),
CLASS_ID SMALLINT,
OBJ_ID INTEGER,
PARAM_ID INTEGER,
USER_COUNT INTEGER)
RETURNS (
NEW_ID INTEGER)
AS
DECLARE VARIABLE NEW_UHI INTEGER;
BEGIN
new_id = gen_id (gen_thm_id, 1);
INSERT INTO thm (id, name) values (:new_id, :thm_name);
SELECT * FROM search_or_insert_rsp (:param_id, :user_count) INTO
:new_uhi;
INSERT INTO guilt (thm_id, cls_id, obj_id) values (:new_id, :class_id,
:obj_id);
INSERT INTO guilt (thm_id, cls_id, obj_id) values (:new_id, 2,
:new_uhi);
suspend;
END
The error mentioned in the subject line occurs, complaining that the value
for
the field 'obj_id' would be NULL. We are sure that this is never the case
and
the error disappears if we modify the line before 'suspend' to:
INSERT INTO guilt (thm_id, cls_id, obj_id) values (:new_id, cast (2 as
SMALLINT), :new_uhi);
Indeed, the column cls_id is defined as SMALLINT, but is this cast really
necessary?
Thanks
Uwe
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]