Subject RE: [IBO] Problem with TIB_Query.RecordCount
Author Thomas Steinmaurer
Hello Jason,

> This appears to be due to an InterBase problem that somehow is being
> triggered up.
> Please develop this into a simple as possible sample app isolating this
> problem.
> It could be of use to the Firebird and InterBase teams.

yes, I have a pretty simple test app with a database with one table,
but I'm not sure if this would be useful for InterBase or Firebird devs,
because they probably do not know something about the IBO HDR feature.

As I've said in my previous post, TIB_Query.RecordCount fails when
using HDR *AND* and ordering (OrderingItemNo <> 0), but it works, if
one of these isn't used.

It probably has someting to do with an additional added parameter
OLNK_<COLUMN> (for example OLNK_ID for a column ID)?

The TIB_MonitorDialog output when calling TIB_Query.RecordCount looks
like:

/*---
EXECUTE STATEMENT
TR_HANDLE = 13721440
STMT_HANDLE = 13721512
PARAMS = [ Version 1 SQLd 2 SQLn 2
[ID] = 2
[OLNK_ID] = -2147483648 ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 13721440
STMT_HANDLE = 13716040

SELECT COUNT( * )
FROM TEST1
WHERE ID=? /* ID */
PLAN (TEST1 INDEX (RDB$PRIMARY1))

FIELDS = [ Version 1 SQLd 1 SQLn 1
COUNT = -1 ]
----*/
/*---
EXECUTE2 DSQL
TR_HANDLE = 13721440
STMT_HANDLE = 13716040
PARAMS = [ Version 1 SQLd 2 SQLn 2
[ID] = 2
[OLNK_ID] = -2147483648 ]
FIELDS = [ Version 1 SQLd 1 SQLn 1
COUNT = -1 ]

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

SECONDS = 0,010

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

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

ERRCODE = 73
----*/
/*---
INTERPRETE BUFFER = SQLDA missing or incorrect version, or incorrect number/type of variables

ERRCODE = -1
----*/


If you are interested in a small D6 sample app with a FB 1.0 database,
please let me know. I'm using IBO 4.2Hj.


Regards,
Thomas Steinmaurer
IB LogManager 2.1 - The Logging/Auditing Tool for InterBase and Firebird
http://www.iblogmanager.com