'SELECT USER' from IDS.2000 error -9971
Posted in 2001
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Data Types & Schema Design
Help!!!! Please.....
I'm migrating my DB from SE to IDS.2000, and my 4gl from 4.2 to 7.3 and have
hit a huge problem.
I've got a simple library function that returns the user login id:
...
define l_user char(10)
select user into l_user from systables where tabid = 1
...
This works fine in 4.x and SE, but produces the following error in 7.3 and
IDS.2000:
4gl run-time error number -9971
unknown error message -9971
The on-line documentation gives the error as:
-9971 Cannot determine the return types of a query or return types are
inconsistent.
The database server cannot determine the data type for one or more of
the values
that the query is to return.
Check the specification of the data type for each return value, correct
any errors
in the specification, and retry the query.
More interestingly, if you type is the select stmt in isql or dbaccess it
works:
select user from systables where tabid = 1
returns:
(expression)
informix
Ummmm, what's my problem???? Or is it just me?
Thanks
Alistair
try dbinfo instead?
Alistair Weatherill schrieb:
>
> Help!!!! Please.....
>
> I'm migrating my DB from SE to IDS.2000, and my 4gl from 4.2 to 7.3 and have
> hit a huge problem.
> I've got a simple library function that returns the user login id:
>
> ...
> define l_user char(10)
> select user into l_user from systables where tabid = 1
> ...
>
> This works fine in 4.x and SE, but produces the following error in 7.3 and
> IDS.2000:
>
> 4gl run-time error number -9971
> unknown error message -9971
>
> The on-line documentation gives the error as:
>
> -9971 Cannot determine the return types of a query or return types are
> inconsistent.
> The database server cannot determine the data type for one or more of
> the values
> that the query is to return.
>
> Check the specification of the data type for each return value, correct
> any errors
> in the specification, and retry the query.
>
> More interestingly, if you type is the select stmt in isql or dbaccess it
> works:
>
> select user from systables where tabid = 1>
> returns:
>
> (expression)
> informix
>
> Ummmm, what's my problem???? Or is it just me?
>
> Thanks
>
> Alistair
--
*******************************************************************************
* Any opinions written in this e-mail are my own. They may not
correspond to *
* those of my
company. *
*******************************************************************************
* Wolfgang Zager Berghauser Str.
104 *
* BAB Data-Systems GmbH D-42349
Wuppertal *
* Abt. Programmierung Tel. : +49 202
479870 *
* Fax : +49 202
470035 *
* E-Mail:
zager@gmx.de *
*******************************************************************************
In article <3A76AF8F.CEBE8CB5@gmx.de>, Wolfgang Zager <zager@gmx.de>
writes
>try dbinfo instead?
>
>Alistair Weatherill schrieb:
>>
>> Help!!!! Please.....
>>
>> I'm migrating my DB from SE to IDS.2000, and my 4gl from 4.2 to 7.3 and have
>> hit a huge problem.
>> I've got a simple library function that returns the user login id:
>>
>> ...
>> define l_user char(10)
>> select user into l_user from systables where tabid = 1
>> ...
usernames as char (18) under Informix 7.x and char(128) under
Informix 9.x
What type is systables.owner?
Try
define l_user like systables.owner (??)
Can't remember the column name but something like that..
>>
>> This works fine in 4.x and SE, but produces the following error in 7.3 and
>> IDS.2000:
>>
>> 4gl run-time error number -9971
>> unknown error message -9971
>>
>> The on-line documentation gives the error as:
>>
>> -9971 Cannot determine the return types of a query or return types are
>> inconsistent.
>> The database server cannot determine the data type for one or more of
>> the values
>> that the query is to return.
>>
>> Check the specification of the data type for each return value, correct
>> any errors
>> in the specification, and retry the query.
>>
>> More interestingly, if you type is the select stmt in isql or dbaccess it
>> works:
>>
>> select user from systables where tabid = 1>>
>> returns:
>>
>> (expression)
>> informix
>>
>> Ummmm, what's my problem???? Or is it just me?
>>
>> Thanks
>>
>> Alistair
>
--
David Williams
"David Williams" <djw@smooth1.demon.co.uk> wrote in message
news:QO01hiAaT1d6EwLO@smooth1.demon.co.uk...
> In article <3A76AF8F.CEBE8CB5@gmx.de>, Wolfgang Zager <zager@gmx.de>
> writes
> >try dbinfo instead?
> >
> >Alistair Weatherill schrieb:
> >>
> >> Help!!!! Please.....
> >>
> >> I'm migrating my DB from SE to IDS.2000, and my 4gl from 4.2 to 7.3 and
have
> >> hit a huge problem.
> >> I've got a simple library function that returns the user login id:
> >>
> >> ...
> >> define l_user char(10)
> >> select user into l_user from systables where tabid = 1
> >> ...
>
> usernames as char (18) under Informix 7.x and char(128) under
> Informix 9.x
>
> What type is systables.owner?
>
systables.owner = char(32)
> Try
> define l_user like systables.owner (??)
>
Have done so... bit still don't work.
> Can't remember the column name but something like that..
>
> >>
> >> This works fine in 4.x and SE, but produces the following error in 7.3
and
> >> IDS.2000:
> >>
> >> 4gl run-time error number -9971
> >> unknown error message -9971
> >>
> >> The on-line documentation gives the error as:
> >>
> >> -9971 Cannot determine the return types of a query or return types
are
> >> inconsistent.
> >> The database server cannot determine the data type for one or more
of
> >> the values
> >> that the query is to return.
> >>
> >> Check the specification of the data type for each return value,
correct
> >> any errors
> >> in the specification, and retry the query.
> >>
> >> More interestingly, if you type is the select stmt in isql or dbaccess
it
> >> works:
> >>
> >> select user from systables where tabid = 1> >>
> >> returns:
> >>
> >> (expression)
> >> informix
> >>
> >> Ummmm, what's my problem???? Or is it just me?
> >>
> >> Thanks
> >>
> >> Alistair
> >
>
> --
> David Williams
Thanks. Alistair