Subject Re: bug, now the requested infos
Author Jason Wharton
This will be fixed in the next sub-release. I figured it out except Idon't
get yet why nobody saw it sooner as all the code involved seemed to not have
been touched recently.

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Andreas Filsinger" <andreas@...>
To: "Jason Wharton" <jwharton@...>
Sent: Tuesday, November 07, 2000 8:19 AM
Subject: bug, now the requested infos


-- snip: ddl

/* Table: ARTIKEL */

CREATE TABLE ARTIKEL (
NUMMER CHAR(10), // <- to this field i link my
TIB_locateEdit
TITEL VARCHAR(100),
KOMPONIST_R INTEGER,
ARRANGEUR_R INTEGER,
RID INTEGER NOT NULL,
LAND_R INTEGER,
SCHWER_R INTEGER,
SERIE_R INTEGER,
ERSTEINTRAG DATE,
INT_INFO_R INTEGER,
INT_BEMERKUNG_R INTEGER,
EINKAUF_R INTEGER,
GEWICHT INTEGER,
LETZTEAENDERUNG DATE,
LETZTERVERKAUF DATE,
INTERN_INFO TMEMO,
LAGER_R INTEGER,
SHOWROOM_R INTEGER,
SORTIMENT_R INTEGER,
DAUER INTEGER,
PROBESTIMME CHAR(1),
HERSTELLER_R INTEGER,
SOUND_R INTEGER,
PAPERCOLOR INTEGER,
MENGE INTEGER,
HAENDLER_R INTEGER);



/* Primary keys definition */

ALTER TABLE ARTIKEL ADD CONSTRAINT ARTIKEL_PK PRIMARY KEY (RID);


/* Foreign keys definition */

ALTER TABLE ARTIKEL ADD CONSTRAINT FK_ARTIKEL_HAENDLER FOREIGN KEY
(HAENDLER_R) REFERENCES PERSON (RID);
ALTER TABLE ARTIKEL ADD CONSTRAINT FK_ARTIKEL_HERSTELLER FOREIGN KEY
(HERSTELLER_R) REFERENCES PERSON (RID);
ALTER TABLE ARTIKEL ADD CONSTRAINT FK_ARTIKEL_SORTIMENT FOREIGN KEY
(SORTIMENT_R) REFERENCES SORTIMENT (RID);


/* Indices definition */

CREATE INDEX ARTIKEL_IDX1 ON ARTIKEL (NUMMER);
CREATE DESCENDING INDEX ARTIKEL_NUMMER_D ON ARTIKEL (NUMMER);
CREATE DESCENDING INDEX ARTIKEL_TITEL_D ON ARTIKEL (TITEL);
CREATE INDEX ARTIKEL_TITLE_A ON ARTIKEL (TITEL);

---- snip

---- snip: SQL-Statement of the query:

SELECT
NUMMER
, TITEL
, MENGE
, ERSTEINTRAG
, DAUER
, KOMPONIST_R
, ARRANGEUR_R
, RID
, LAND_R
, SCHWER_R
, SERIE_R
, INT_INFO_R
, INT_BEMERKUNG_R
, EINKAUF_R
, GEWICHT
, LETZTEAENDERUNG
, LETZTERVERKAUF
, INTERN_INFO
, LAGER_R
, SHOWROOM_R
, SORTIMENT_R
, PROBESTIMME
, HERSTELLER_R
, SOUND_R
, PAPERCOLOR
, HAENDLER_R
FROM ARTIKEL
FOR UPDATE

---- snip

-> the tib_locateedit is linked to Field "NUMMER"

---- monitored bugy sql statement (!wow! most exciting) "c"-Version

/*---
PREPARE STATEMENT
TR_HANDLE = 15021044
STMT_HANDLE = 15177956

SELECT RID
FROM ARTIKEL
WHERE \N\K NUMMER\N\K = ? /* LOC_0_ARTIKEL_NUMMER */
ORDER BY TITEL DESC

FIELDS = [ Version 1 SQLd 26 SQLn 1
ARTIKEL.NUMMER = <NIL> ]

SECONDS = 0,010

ERRCODE = 335544569
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 15021044
STMT_HANDLE = 15177956

SELECT RID
FROM ARTIKEL
WHERE \N\K NUMMER\N\K = ? /* PRM_0 */
ORDER BY TITEL DESC

FIELDS = [ Version 1 SQLd 26 SQLn 1
ARTIKEL.NUMMER = <NIL> ]

ERRCODE = 335544569
----*/
/*---
INTERPRETE BUFFER =

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

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

ERRCODE = 30
----*/
/*---
INTERPRETE BUFFER = Token unknown - line 3, char 5

ERRCODE = 1
----*/
/*---
INTERPRETE BUFFER = \

ERRCODE = -1
----*/

----

this is the "good" "old" "ok" version: "no sub"-Version

/*---
PREPARE STATEMENT
TR_HANDLE = 15021044
STMT_HANDLE = 15182664

SELECT RID
FROM ARTIKEL
WHERE NUMMER = ? /* LOC_0_ARTIKEL_NUMMER */
ORDER BY TITEL DESC

PLAN (ARTIKEL ORDER ARTIKEL_TITEL_D)

FIELDS = [ Version 1 SQLd 1 SQLn 1
ARTIKEL.RID = <NIL> ]

SECONDS = 0,059
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 15021044
STMT_HANDLE = 15182664
PARAMS = [ Version 1 SQLd 1 SQLn 1
[LOC_0_ARTIKEL_NUMMER] = '137150 ' ]
----*/
/*---

-> hope this helps ...

Mfg.A.Filsinger
_______________________________________________________
/ Tel. +49 7251 966100 | Andreas Filsinger \
| Mob. +49 175 5913758 | Softwareentwicklung |
| Fax. +49 7251 966101 | Stettfelder Strasse 44 |
| mailto:Andreas@... | 76698 Ubstadt |
| http://www.CargoBay.de | GERMANY |
\_______________________________________________________/