Subject RE: [Firebird-Java] Re: GDSError
Author Rotandiko Sastroprawiro
Dear rrokytskyy,

what method of preparedStatement u using, are
preparedStatement.executeUpdate or preparedStatement.executeQuery ??

Regards,

Diko

-----Original Message-----
From: rrokytskyy [mailto:rrokytskyy@...]
Sent: Friday, July 12, 2002 10:59 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: GDSError


Fine, it turns out that the only way to execute procedure that
returns values is SELECT ... FROM my_proc. I got no answer on my
question in firebird-devel list, so I let's call it "known bug".

Roman

--- In Firebird-Java@y..., Rotandiko Sastroprawiro
<rsastroprawiro@b...> wrote:
> Dear all
>
> I have the same problem, but i was executing stored procedure that
returns
> integer using
> EXECUTE PROCEDURE. the stored procedure is :
>
> ET TERM ##;
> CREATE PROCEDURE MERGE_CONTENT (SRC INTEGER, DST INTEGER)
> RETURNS (Result SMALLINT)
> AS
> BEGIN
> UPDATE REF_MASTER SET CATEGORY_ID = :DST
> WHERE
> EXISTS(SELECT DISTINCT CONTENT_ID FROM REF_MASTER WHERE
> CATEGORY_ID = :SRC
> AND NOT EXISTS( SELECT CONTENT_ID FROM REF_MASTER WHERE
> CATEGORY_ID = :DST))
> AND CATEGORY_ID = :SRC;
> DELETE FROM M_CATEGORIES WHERE CATEGORY_ID = :SRC;
> Result = 1;
> EXIT;
> END ##
>
>
>
> Regards
>
> Diko
>
> -----Original Message-----
> From: rrokytskyy [mailto:rrokytskyy@y...]
> Sent: Thursday, July 11, 2002 7:32 AM
> To: Firebird-Java@y...
> Subject: [Firebird-Java] Re: GDSError
>
>
> > After successfully executing a statement with the Firebirdsql
driver,
> > we always get an exception:
> > ...
> > GDSException: org.firebirdsql.gds.GDSException: message length
error
> > (encountered 64, expected )
> > ...
> >
> > What does this mean, and where can I get a list of possible error
> > codes?
>
> recently I got the same problem. I was executing stored procedure
that
> returns result set using EXECUTE PROCEDURE ... instead of SELECT *
> FROM ... via java.sql.Statement. Using SELECT instead of EXECUTE
> PROCEDURE solved the problem. I have posted this question to
> firebird-devel list and will keep you informed if I get any
response.
>
> Best regards,
> Roman Rokytskyy
>
> P.S. I have updated execption handling, now message will be "message
> length error (encountered 0, expected 64)", which is correct in
this case.
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@y...
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/



To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/