Database error -254.
Posted in 1999
Topics: Platform-Specific Issues
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 reply to gparamg@uswest.com We are using Informix version 7.3x on Hp-ux 10.20 Thanks Paramguru.
Gopili Paramguru wrote: > > 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. > 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 > gparamg@uswest.com > We are using Informix version 7.3x on Hp-ux 10.20 Art S. Kagel