Subject [IBO] Re: master-detail problem after upgrade to 4.5 (eval)
Author rudi_josic
>1. What exception messages do you see?

when tring to prepare the detil query the error raised is:

Exception class EIB_ISCError with message 'ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 5, char 47
"_0"
'
(i open the master query before the detail one)

>2. Do make sure NOT to place blanks at the left and right sides of
the "="
sign.

(i cut and paste from query editor, and there is no blanks)

**in the master query:

SELECT "Id"
, "Nombre"
FROM "Muebles"

keylinks:"Muebles"."Id"

**in the detail query

SELECT "Id_Mueble"
, "Id_Material"
, "Cantidad"
FROM "Requiere"

keyliks:"Requiere"."Id_Mueble"
"Requiere"."Id_Material"

masterliks:"Requiere"."Id_Mueble" = "Muebles"."Id"

and, off course, mastersource is the Datasourse of the master query :)

in the db declaration: SET SQL DIALECT 3;
in the tib_connection: SQLDialect 3

i put a ib_monitor, i hope this information helps:

/*---
START TRANSACTION
DB HANDLE COUNT 1
TR_HANDLE = 3829940
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 3829940
STMT_HANDLE = 3830036

SELECT "Id"
, "Nombre"
FROM "Muebles"
ORDER BY "Nombre" ASC

PLAN SORT ((Muebles NATURAL))

FIELDS = [ Version 1 SQLd 2 SQLn 30
MUEBLES.ID = <NIL>
MUEBLES.NOMBRE = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 3829940
STMT_HANDLE = 3830036
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 3829940
STMT_HANDLE = 3829604


SELECT "Id_Mueble"
, "Id_Material"
, "Cantidad"
FROM "Requiere"
WHERE "Requiere"."Id_Mueble" =? /* "MLNK_Id_Mueble" */ "_0"

FIELDS = [ Version 1 SQLd 2 SQLn 30
MUEBLES.ID = <NIL>
MUEBLES.NOMBRE = <NIL> ]

ERRCODE = 335544569
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 3829940
STMT_HANDLE = 3829604

SELECT "Id_Mueble"
, "Id_Material"
, "Cantidad"
FROM "Requiere"
WHERE "Requiere"."Id_Mueble" =? /* PRM_0 */ "_0"

FIELDS = [ Version 1 SQLd 2 SQLn 30
MUEBLES.ID = <NIL>
MUEBLES.NOMBRE = <NIL> ]

ERRCODE = 335544569
----*/
/*---
INTERPRET BUFFER =

ERRCODE = 17
----*/
/*---
INTERPRET BUFFER = Dynamic SQL Error

ERRCODE = 21
----*/
/*---
INTERPRET BUFFER = SQL error code = -104

ERRCODE = 31
----*/
/*---
INTERPRET BUFFER = Token unknown - line 5, char 47

ERRCODE = 4
----*/
/*---
INTERPRET BUFFER = "_0"

ERRCODE = -1
----*/
/*---
COMMIT
TR_HANDLE = 3830280
----*/
/*---
COMMIT
TR_HANDLE = 3830224
----*/
/*---
COMMIT
TR_HANDLE = 3829940
----*/


>3. Please do not requote old messages.

Sorry