Subject | TIBOTable.indexfieldnames , desc (Part2) |
---|---|
Author | markus.leoni@use-soft.com |
Post date | 2002-03-14T09:59:41Z |
Hi Jason,
Yes i use the latest Version of IBO (IBO4.2.Ga) in Delphi5.
I trace the problem and i saw if i called the following procedure two times
the error is executed.
procedure TForm1.BitBtn1Click(Sender: TObject);
var SFilter, value: string;
begin
value := '';
Sfilter := '( knr like :VAL or blnr like :VAL || "%" or upper(Name1) like "%" || :upVAL || "%" ) and filnr = 0';
tbH.close;
tbH.IndexFieldNames := 'BLDATE desc;BLNR desc';
// Set SQLWhere
with tbH.SQLWhere do
begin
clear;
add('where '+SFilter);
end;
// SetParams
tbH.parambyname('VAL').asstring := VALUE;
tbH.parambyname('upVAL').asstring := uppercase(VALUE);
// Prepeare SQL
tbH.InvalidateSQL;
if not tbH.active then tbH.open;
end;
Trace Monitor output:
1. Fist call:
/*---
PREPARE STATEMENT
TR_HANDLE = 14637068
STMT_HANDLE = 14637140
SELECT ALL B03LF.*
FROM B03LF
where ( knr like ? /* VAL */ or blnr like ? /* VAL */ || "%" or upper(Name1) like "%" || ? /* upVAL */ || "%" ) and filnr = 0
ORDER BY BLDATE DESC
, BLNR DESC
PLAN SORT ((B03LF INDEX (IFILNRB03LF)))
2. Second call
/*---
PREPARE STATEMENT
TR_HANDLE = 14637068
STMT_HANDLE = 14637140
SELECT ALL B03LF.*
FROM B03LF
WHERE BLDATE desc /*<*/ >= ? /* OLNK_BLDATE */ DESC
ORDER BY BLDATE DESC
, BLNR DESC
FIELDS = [ Version 1 SQLd 2 SQLn 100
RDB$RELATION_FIELDS.RDB$FIELD_NAME = <NIL>
RDB$RELATION_FIELDS.RDB$RELATION_NAME = <NIL> ]
SECONDS = 0,010
ERRCODE = 335544569
----*/
:-) Markus Leoni
Yes i use the latest Version of IBO (IBO4.2.Ga) in Delphi5.
I trace the problem and i saw if i called the following procedure two times
the error is executed.
procedure TForm1.BitBtn1Click(Sender: TObject);
var SFilter, value: string;
begin
value := '';
Sfilter := '( knr like :VAL or blnr like :VAL || "%" or upper(Name1) like "%" || :upVAL || "%" ) and filnr = 0';
tbH.close;
tbH.IndexFieldNames := 'BLDATE desc;BLNR desc';
// Set SQLWhere
with tbH.SQLWhere do
begin
clear;
add('where '+SFilter);
end;
// SetParams
tbH.parambyname('VAL').asstring := VALUE;
tbH.parambyname('upVAL').asstring := uppercase(VALUE);
// Prepeare SQL
tbH.InvalidateSQL;
if not tbH.active then tbH.open;
end;
Trace Monitor output:
1. Fist call:
/*---
PREPARE STATEMENT
TR_HANDLE = 14637068
STMT_HANDLE = 14637140
SELECT ALL B03LF.*
FROM B03LF
where ( knr like ? /* VAL */ or blnr like ? /* VAL */ || "%" or upper(Name1) like "%" || ? /* upVAL */ || "%" ) and filnr = 0
ORDER BY BLDATE DESC
, BLNR DESC
PLAN SORT ((B03LF INDEX (IFILNRB03LF)))
2. Second call
/*---
PREPARE STATEMENT
TR_HANDLE = 14637068
STMT_HANDLE = 14637140
SELECT ALL B03LF.*
FROM B03LF
WHERE BLDATE desc /*<*/ >= ? /* OLNK_BLDATE */ DESC
ORDER BY BLDATE DESC
, BLNR DESC
FIELDS = [ Version 1 SQLd 2 SQLn 100
RDB$RELATION_FIELDS.RDB$FIELD_NAME = <NIL>
RDB$RELATION_FIELDS.RDB$RELATION_NAME = <NIL> ]
SECONDS = 0,010
ERRCODE = 335544569
----*/
:-) Markus Leoni
----- Original Message -----
Message: 19
Date: Wed, 13 Mar 2002 11:52:51 -0700
From: "Jason Wharton" <jwharton@...>
Subject: Re: TIBOTable.indexfieldnames , desc
What does the trace monitor show you?
Are you using the latest version of IBO?
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: <markus.leoni@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, March 12, 2002 7:34 AM
Subject: [IBO] TIBOTable.indexfieldnames , desc
> I use IBO4.2.Ga.
> My problem is, if i set the following property "TIBOTable.indexfieldnames
:= BLDATE desc;BLNR desc" and i open the table in the developer enviroment
> all is ok, but i open the table in the exe an Error is displayed
> "Token unknown desc".
>
> Is this an BUG ?
> :-) Markus Leoni
[Non-text portions of this message have been removed]