Subject RE: [Firebird-Java] Re: OBJECT in use during Foreign key creation
Author Robert DiFalco
Message
Thanks Roman. Yeah, I checked with ib-support list and apparently Firebird does except blob's as input, even with the SUB_TYPE and SEGMENT clauses. I'll come up with a small JUnit test for this. Give me a day or two. I have to move on for now.
 
R.
-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Wednesday, March 26, 2003 1:43 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: OBJECT in use during Foreign key creation

Hi,

Interesting... I will try your examples, probably during weekend.
However here is very interesting thing that might be related to your
case.

> CREATE PROCEDURE insertClassInfo(
>     nId INTEGER,sClassname BLOB SUB_TYPE 1,sStrategy BLOB SUB_TYPE
> 1,sCodebase BLOB SUB_TYPE 1)
> AS BEGIN
>     INSERT INTO ClassInfo(id,classname,strategy,codebase)
>     VALUES (:nId,:sClassname,:sStrategy,:sCodebase); END

Language Reference for IB 6.0 defines following syntax for CREATE
PROCEDURE:

CREATE PROCEDURE name
[( param < datatype> [, param < datatype> …])]
[RETURNS < datatype> [, param < datatype> …])]
AS <procedure_body> [ terminator]

<procedure_body> =
[ <variable_declaration_list>]
< block>

<variable_declaration_list> =
DECLARE VARIABLE var < datatype>;
[DECLARE VARIABLE var < datatype>; …]

< block> =
BEGIN
< compound_statement>
[< compound_statement> …]
END

< compound_statement> = {< block> | statement;}

< datatype> = SMALLINT
| INTEGER
| FLOAT
| DOUBLE PRECISION
| {DECIMAL | NUMERIC} [( precision [, scale])]
| {DATE | TIME | TIMESTAMP)
| {CHAR | CHARACTER | CHARACTER VARYING | VARCHAR}
[( int)] [CHARACTER SET charname]
| {NCHAR | NATIONAL CHARACTER | NATIONAL CHAR} [VARYING] [( int)]


As you see, BLOB SUB_TYPE 1 does not belong to the list of allowed
data types. I do not know if this is bug in reference or in syntax
parser. Ask this in IB-Support.

> Any suggestions? Am I missing something fundamental? Probably.

Try asking this in IB-Support, this seems to be engine issue. Also a
small test case (preferably JUnit one) that reproduces the problem
would be very nice, this saves us time to reproduce the bug.

Thanks!
Roman



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



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.