SQLTools Include Problem with 3.6x

Started by Mark Strickland, August 16, 2012, 11:06:51 AM

Previous topic - Next topic

Mark Strickland

I have a program that compiles fine with 3.5x but when I try to use 3.6x there is an undefined reference.  Strangely in the xx_DECLARES.inc file the order of the SQLtools declares are generated in the wrong order from the original INC file supplied by SQLtools.
The SQL_YEAR_MONTH is undefined in this structure:

    Union SQL_INTERVAL                  '20 BYTES, 16 OF WHICH ARE NOT USED BY YEARMONTH.
         YearMonth As SQL_YEAR_MONTH
         DaySecond As SQL_DAY_SECOND
    End Union


The SQLtools.inc delivered file has the TYPE structure defined BEFORE it is referenced in the file.  The DECLARES.inc generated code reverses the order and apparently PB cannot resolve the forward reference.

I have not tried to modify the SQLtools.INC file but I suspect even if I fixed this one other forward referenced values would happen.

My temporary work around is to use 3.5x.

Is there a quick fix?
Mark Strickland, CISSP, CEH
www.SimplyBASICsoftware.com

Paul Squires

Hi Mark,

You would need to #INCLUDE the inc file (usually in the FF_APPSTART handler) rather than include it into your project as a Module. 3.60 uses a slightly different ordering of items when automatically creating the DECLARES file. In this case, it must place the reference in a position where it is referenced befored declared.
Paul Squires
PlanetSquires Software

Mark Strickland

That fixed it but what was curious was the out of order references were both in the SAME include file but in a different order than in the xx_DECLARES.inc file.  Obviously FF does some "rearranging".

Thanks!
Mark Strickland, CISSP, CEH
www.SimplyBASICsoftware.com