Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Problem with a procedure

2 posts in General Discussion Last posting was on 2002-09-03 15:53:07.0Z
Susanne Bollin Posted on 2002-08-30 21:31:13.0Z
From: "Susanne Bollin" <s.bollin@gmx.de>
Subject: Problem with a procedure
Date: Fri, 30 Aug 2002 23:31:13 +0200
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <cr68g#GUCHA.198@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: B6223.pppool.de 213.7.98.35
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:649
Article PK: 2663

Hi,

this is my procedure:

CREATE PROCEDURE anlegen (
Att1 integer,
Att2 char(1),
Att3 integer,
Att4 integer) BEGIN
INSERT INTO Speicher(Sp1, Sp2, Sp3, Sp4)
VALUES (Att1, Att2, Att3, Att4);
END;

If I call this procedure I get the error ASA-195, that Sp1 cannot be Null.
But with Att1 I gave the procedure a value for Sp1. If I try this
INSERT-instruction only it works. Why not within the procedure? Where is
the problem?

Additional I have a Trigger, who generates a number for every
insert-instruction.

Who can help me?


Stephen Rice Posted on 2002-09-03 15:53:07.0Z
Subject: Re: Problem with a procedure
From: Stephen Rice <srice_nospam@ianywhere.com>
References: <cr68g#GUCHA.198@forums.sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns927E76A16EFC5sriceianywherecom@199.93.177.77>
User-Agent: Xnews/L5
Newsgroups: ianywhere.public.general
Date: Tue, 03 Sep 2002 11:53:07 -0400
Lines: 35
NNTP-Posting-Host: 172.31.141.72
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:646
Article PK: 2660

"Susanne Bollin" <s.bollin@gmx.de> wrote in
news:cr68g#GUCHA.198@forums.sybase.com:

> Hi,
>
> this is my procedure:
>
> CREATE PROCEDURE anlegen (
> Att1 integer,
> Att2 char(1),
> Att3 integer,
> Att4 integer) BEGIN
> INSERT INTO Speicher(Sp1, Sp2, Sp3, Sp4)
> VALUES (Att1, Att2, Att3, Att4);
> END;
>
> If I call this procedure I get the error ASA-195, that Sp1 cannot be
> Null. But with Att1 I gave the procedure a value for Sp1. If I try
> this INSERT-instruction only it works. Why not within the procedure?
> Where is the problem?
>
> Additional I have a Trigger, who generates a number for every
> insert-instruction.
>
> Who can help me?
>

There is nothing obviously wrong with the procedure itself. You can use
the stored procedure debugger to examine the actual values passed to the
procedure.

If that doesn't get you the answer then I suggest you repost on
sybase.public.sqlanywhere.general including the table definition and the
CALL statement.

The .general newsgroup is specifically focused on SQL Anywhere and many
more people are likely to see you question.

/steve


--
Stephen Rice
Technical Services Manager
iAnywhere Solutions

Whitepapers, TechDocs, bug fixes are all available through the
iAnywhere Developer Community at http://www.ianywhere.com/developer
------ Please Post ------