Informix "LET" statement problem in Stored Procedures
Posted in 1997
Topics: SQL Development & Query Writing, Stored Procedures & SPL, Error Codes & Troubleshooting, Connectivity: ODBC / JDBC / .NET, Server Administration, Data Types & Schema Design
Here is a strange problem we get with Informix 5.07
Stored Procedures and we need some urgent help.
Please send an e-mail reply to the below mentioned problem.
H/W Setup : Unisys U6K M/c (Dual Pentium SMP5400)
S/W Setup
Operating System : UNIX SVR4
Database : Informix Online 5.07, Informix-Star 5.07
Client : Informix NET 5.0, Q+E database library 2.0
(using ODBC calls)
Problem description :
When some of the Stored Procedures are executed from
the client software, it works fine the first time it is
executed but when it is executed the next time
one of the following error messages are
obtained and it happens unpredictably.
1.Error code -363 [Q+E Software][ODBC Informix driver]
[Informix]CURSOR not on SELECT statement
2.Error code -208 [Q+E Software][ODBC Informix driver]
[Informix]Memory allocation failed during query processing.
3.Error code -260 [Q+E Software][ODBC Informix driver]
[Informix]Cannot use SELECT on a PREPAREd statement : Use cursor.
4.Error code -1260 [Q+E Software][ODBC Informix driver]
[Informix]Cannot convert between the specified types.
There is no CURSOR or PREPARE statement in the Stored Procedures.
And the data type conversions are correct, since the procedure
works the first time around.
When the Stored procedure is executed once again (third time)
( or even if some other queries are executed ) it says
Error code 457 [Q+E Software][ODBC Informix driver]
[Informix]Database server terminated unexpectedly.
and after this the database connection is lost and the
client application has to be restarted.
At this point the Informix online log file has the following
error message :
18:21:20 Process Aborted Abnormally: pid=12949 user=106 us=401e38 flags=1
This happens to all Stored Procedures which are long
and which use more than 230 -240 "let" statements
(for assigment).
When the trace is turned on to check what is happening
in these stored procedures a core is dumped in the
home directory of the user's UNIX login and no trace
file is formed.
This happens only when the Stored Procedures are
executed from the client pc(with the help of NET-PC and NET-STAR).
They all work fine if executed separately using
dbaccess.
A sample procedure with no input and no return
value but with around 300 let statements
when executed repeatedly from the client s/w
gives this problem.
For e.g a test procedure to simulate
the above problem would be :
create procedure lettest()
define int a;
let a = 1;
let a = 1;
let a = 1;
.
.
.
-- Let the above assigment statement be
-- repeated 300 times
end procedure;
Running this stored procedure several times from our client
s/w (within a single connection) gives the above mentioned
problem.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet