Database error -254.

Database error -254.

Post by Gopili Paramgur » Sun, 31 Dec 1899 09:00:00



Hi all,
    I am getting a strange error in my application. Its database error
-254 which is explained in informix manuals as :
The number of host variables that you named in the INTO clause of this
statement does not match the number of "?" place holders that you wrote
into the statement. Locate the text of the statement (in a PREPARE or
DECLARE statement), and verify the number of place holders. Then review
the list in the INTO clause to see which item is incorrect.

The application is running in produciton for almost 2 months and around
100 users are using it. But we got this error only a very few times.
When I try to simulate the problem I don't get it. When I asked the user
to come out of the application and run it again it worked fine. I know
this error comes if pass fewer or more host variables to a prepared
statement but I can't understand why it works sometimes and fails
sometimes.
This error started coming up once we changed the lock level of tables to
row from page. I don't know if that had affected this.
Any help will be greatly appreciated. If possible send a copy of your

We are using Informix version 7.3x on Hp-ux 10.20

Thanks
Paramguru.

 
 
 

Database error -254.

Post by Art S. Kage » Sun, 31 Dec 1899 09:00:00



> Hi all,
>     I am getting a strange error in my application. Its database error -254
> which is explained in informix manuals as :
> The number of host variables that you named in the INTO clause of this
> statement does not match the number of "?" place holders that you wrote
> into the statement. Locate the text of the statement (in a PREPARE or
> DECLARE statement), and verify the number of place holders. Then review
> the list in the INTO clause to see which item is incorrect.

Usually happens like this when someone has altered a table referred to in
a compiled application in a "SELECT * " statement.  The new number of
columns does not any longer correspond to the number of host variables.

Quote:> The application is running in produciton for almost 2 months and around 100
> users are using it. But we got this error only a very few times. When I try to
> simulate the problem I don't get it. When I asked the user to come out of the
> application and run it again it worked fine. I know this error comes if

This is odd and may mean that your application has memory corruption that
is trashing the sqlda structure that the compiler produced so that the
number of host entries in the linked list of host vars, or the number of
columns in the linked list of columns no longer corresponds to the source
code after running for a while.  This can be very difficult to diagnose
but look for dynamic SQL being written on the fly into a local or static
character array that has become larger than the array.  That is one common
source.  (When the SQL limit was 4096 bytes I always declared such strings
as 4097 bytes long, now I guess I have to start making them 32768 bytes.)

pass

> fewer or more host variables to a prepared statement but I can't understand
> why it works sometimes and fails sometimes.
> This error started coming up once we changed the lock level of tables to row
> from page. I don't know if that had affected this.
> Any help will be greatly appreciated. If possible send a copy of your reply to

> We are using Informix version 7.3x on Hp-ux 10.20

Art S. Kagel

 
 
 

1. error 254 after select *..(sqbindalloc)

Hello to all,

This SQL-Statement generates an error 254:

Informix Dynamic Server 2000 Version 9.21.UC4     -- On-Line -- Up
03:05:05 -- 2
09372 Kbytes

Sess  SQL            Current            Iso Lock       SQL  ISAM F.E.
Id    Stmt type      Database           Lvl Mode       ERR  ERR  Vers
15    SELECT      xxx            NL  Wait       -254 0    7.24

Current statement name : c000004

Current SQL statement :
  select system_key,key_value,description from sysdirm where (system_key=?)

Last parsed SQL statement :
   set lock mode to wait

Ive set an onmode -I 254 so that weve the following stack-output:

( 0)  0x006ac720   legacy_hp_afstack + 0x190  [/var/informix/bin/oninit]
( 1)  0x006abf98   afstack + 0x54  [/var/informix/bin/oninit]
( 2)  0x006ab548   afhandler + 0x744  [/var/informix/bin/oninit]
( 3)  0x006aacf0   affail_interface + 0x50  [/var/informix/bin/oninit]
( 4)  0x004c3524   check_traperror + 0x180  [/var/informix/bin/oninit]
( 5)  0x00145b00   sqerr + 0x3b4  [/var/informix/bin/oninit]
( 6)  0x001a15c0   sqbindalloc + 0x104  [/var/informix/bin/oninit]
( 7)  0x001a0b84   sq_bind + 0x480  [/var/informix/bin/oninit]
( 8)  0x003c3f3c   sqmain + 0x1c8  [/var/informix/bin/oninit]
( 9)  0x006b2910   startup + 0x98  [/var/informix/bin/oninit]
(10)  0x0068e120   mt_swap_threads + 0x10c  [/var/informix/bin/oninit]

 base: 0xcb9c9000
  len:   36864
   pc: 0x00000000
  tos: 0xcb9ca110
state: running
   vp: 1

We suppose that could be the bug 107996 or 132242, but in the description
the problem occur only by insert-activities an not by a simple select !

Weve checked the data in the table.
Sometimes there`re two following lines with a "'" in the first line
and a "?" in the second line, so these bug could be possible.

Im looking forward for any ideas...

Thanks in advance

Erik Stahlhut

2. Help run form on web

3. whats is ESQL/C error code -254?

4. mysql and excel

5. SQL error code -254

6. INET for Solaris x86

7. error 254

8. Paradox password problem

9. Informix -254 errors with JAM DBi 5.10

10. Fetch server cursor fails when over 254 columns

11. Splitting a Text Field into 254 char chunks.

12. Text fieds cutted on 254 chars

13. Problème avec ODBC Lotus NotesSql driver 2.05 (limitation de 254 caractères)