systables query fails
Posted in 2009
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Versions, Editions & End-of-Life
I have a weird issue here and was wandering if anyone had seen something
similar.
I wrote a 4gl program that in the course of it executes the following query:
SELECT tabname FROM systables WHERE owner = "owner"
the query works but every other time I run it it truncates the names of tables
to 18 characters!! If I recompile and replace the double quotes with single
quotes it will work but the next time I run the program it truncates again and
I have to replace single quotes with doubles, recompile and then it work one
more time.
I am running this on IDS 9.40
What version of 4GL?
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Fri, Aug 28, 2009 at 12:12 PM, PETER GEYFMAN <peterg75@gmail.com> wrote:
> I have a weird issue here and was wandering if anyone had seen something
> similar.
> I wrote a 4gl program that in the course of it executes the following
> query:
>
> SELECT tabname FROM systables WHERE owner = "owner">
> the query works but every other time I run it it truncates the names of
> tables
> to 18 characters!! If I recompile and replace the double quotes with single
> quotes it will work but the next time I run the program it truncates again
> and
> I have to replace single quotes with doubles, recompile and then it work
> one
> more time.
>
> I am running this on IDS 9.40
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0023545bd84c02de58047237f1e1
I'm running 4GL version 7.20.UC7
I'm guessing, but since 7.20 predates the increase in object name size from 18 bytes to 128 bytes the compiler may be parsing the query and forcing the SQLDA structure for the tabname to retrieve only 18 bytes long. Try preparing the statement so the compiler doesn't see it at all. Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Fri, Aug 28, 2009 at 3:30 PM, PETER GEYFMAN <peterg75@gmail.com> wrote: > I'm running 4GL version 7.20.UC7 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --00151747b6401aacbb047239ddb0