Subject Incorrect values within SQLDA structure *** URGENT ***
Author DaveR
Help!

I'm really lost on this one. I have an IB_Query with is giving me a great
deal of grief. I think the problem is down to dates and IB6, since it
worked on an IB5.5 version of the DB.

I have attached a fairly full trace of what's happening in the hope that
someone cam shed light on the matter, if more info is needed, just ask.
Please excuse the long post. I really don't know where to start. I have
other queries that use Dates in the same app, but they seem OK.

Preparing the Query in design mode does not give an error.

This is really urgent, so ANY pointers would be a help.

I'm using IBO 3.6D, and IB6.01 on W2KP.

CONNECT DATABASE ....
DB_HANDLE = 13589424
START TRANSACTION
DB HANDLE COUNT 1
TR_HANDLE = 13589252
----
PREPARE STATEMENT
TR_HANDLE = 13589252
STMT_HANDLE = 20248152

SELECT ID
, UNIT
, RESORT
, ( SELECT UNITS.UNIT
FROM UNITS WHERE
UNITS.ID = WEEKS.UNIT ) AS DISP_UNIT
, WEEK
, SEASON
, FIRSTOCCUPANCY
, PAIDTO
, BASECOST
, TRADEPRICE
, RETAILPRICE
, SALEPRICE
, RCIPOINTS
, VENDOR
, VENDORREF
, PURCHASER
, DATEENTERED
, DATECONFIRMED
, SUSPENDDATE
, DATERESERVED
, DATESOLD
, NOTES
FROM WEEKS
WHERE weeks.resort=? /* MLNK_RESORT_0 */

PLAN (UNITS INDEX (RDB$PRIMARY19))
PLAN (WEEKS INDEX (RDB$FOREIGN23))

FIELDS = [ Version 1 SQLd 22 SQLn 22
WEEKS.ID = <NIL>
WEEKS.UNIT = <NIL>
WEEKS.RESORT = <NIL>
[DISP_UNIT] = <NIL>
WEEKS.WEEK = <NIL>
WEEKS.SEASON = <NIL>
WEEKS.FIRSTOCCUPANCY = <NIL>
WEEKS.PAIDTO = <NIL>
WEEKS.BASECOST = <NIL>
WEEKS.TRADEPRICE = <NIL>
WEEKS.RETAILPRICE = <NIL>
WEEKS.SALEPRICE = <NIL>
WEEKS.RCIPOINTS = <NIL>
WEEKS.VENDOR = <NIL>
WEEKS.VENDORREF = <NIL>
WEEKS.PURCHASER = <NIL>
WEEKS.DATEENTERED = <NIL>
WEEKS.DATECONFIRMED = <NIL>
WEEKS.SUSPENDDATE = <NIL>
WEEKS.DATERESERVED = <NIL>
WEEKS.DATESOLD = <NIL>
WEEKS.NOTES = <NIL> ]

EXECUTE STATEMENT
TR_HANDLE = 13589252
STMT_HANDLE = 20248152
PARAMS = [ Version 1 SQLd 1 SQLn 1
[MLNK_RESORT_0] = 174 ]

INTERPRETE BUFFER =
ERRCODE = 17

INTERPRETE BUFFER = Dynamic SQL Error
ERRCODE = 21

INTERPRETE BUFFER = SQL error code = -804
ERRCODE = 39

INTERPRETE BUFFER = Incorrect values within SQLDA structure
ERRCODE = -1