Article View: borland.public.interbase.opensource
Article #202first stored procedure with Firebird 1.5.
From: Dierk
Date: Fri, 18 Nov 2005 18:23
Date: Fri, 18 Nov 2005 18:23
48 lines
2116 bytes
2116 bytes
Hi I want ot write my first stored procedure with Firebird 1.5.
But it is very hard for me. It don�t work.
I run always in trouble. Where�s the problem??
Thanks
Dierk
CREATE PROCEDURE INSUPD_MESSWERT(
iStation SMALLINT,
iMesspunkt SMALLINT, iZeitpunkt TIMESTAMP,
iStatus SMALLINT,
iMesswert DOUBLE PRECISION )
AS
BEGIN
INSERT INTO Messwerte(Station, Messpunkt, Zeitpunkt, Status, Messwert)
VALUES (:iStation, :iMesspunkt, :iZeitpunkt, :iStatus, :iMesswert);
/*Doppelter Prim�rindex */
WHEN SQLCODE -803 do
UPDATE Messwerte SET
Station = :iStation,
Messpunkt = :iMesspunkt,
Zeitpunkt = :iZeitpunkt,
Status = :iStatus,
Messwert = :iMesswert
WHERE (Station=:iStation) and (Messpunkt=:iMesspunkt) and
(Zeitpunkt=:iZeitpunkt)
END
END
////////////////////////////////////////////////////////////
Statement #1:
Dynamic SQL Error
SQL error code = -104
Unexpected end of command
Statement #2:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 4, char 3
WHEN
////////////////////////////////////////////////////////////
Technical Details
Message-ID:
<437e1c08@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 106772,f200e8b7b75d3ade,start X-Google-Attributes: gid106772,public X-Google-Language: GERMAN,ASCII Reply-To: "Dierk" <noSpam@csslabs.de> From: "Dierk" <noSpam@csslabs.de> Newsgroups: borland.public.interbase.opensource Subject: first stored procedure with Firebird 1.5. Date: Fri, 18 Nov 2005 19:23:50 +0100 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 NNTP-Posting-Host: 84.164.0.73 Message-ID: <437e1c08@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1132338184 84.164.0.73 (18 Nov 2005 10:23:04 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail