Bonjour,

Quelqu'un a t'il déjà été confronté à un SQLCODE -804 lors de l'OPEN d'un curseur. Cela me parait totalement incompréhensible. C'est un programme existant qu'on vient de modifier. Et lors de l'ouverture de plusieurs curseurs (déjà existants et non modifiés ou nouveaux curseurs), on se retrouve avec un -804.

Ci-joint un copier/coller de la SQLCA.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
01 SQLCA                          GROUP                        
02 SQLCAID                        X(8)             SQLCA       
02 SQLCABC                        S9(9) COMP       +00000136   
02 SQLCODE                        S9(9) COMP       -00000804   
02 SQLERRM                        GROUP                        
03 SQLERRML                       S9(4) COMP       +0002       
03 SQLERRMC                       X(70)            06          
02 SQLERRP                        X(8)             DSNXECP     
02 SQLERRD                        S9(9) COMP       -00000209   
OCCURS 6 TIMES                                     1
Et ci-joint un copier/coller de la doc IBM

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-804 AN ERROR WAS FOUND IN THE APPLICATION PROGRAM INPUT PARAMETERS FOR THE SQL STATEMENT, REASON reason
 
Explanation: The call parameter list or the SQLDA isinvalid.
- The call parameter list, which is created by the precompiler, might be invalid if the application programmer has modified the output of the precompiler, used a variable name beginning with ’SQL’ in the application program, or overwritten the call parameter list in some other way.
- The SQLDA, which is created by the application program, has an invalid data type or data length.
- The value of SQLDABC is not consistent with the value of SQLD.
 
The following is the list of reason codes:
01 Open issued for non-cursor.
02 Close issued for non-cursor.
03 Prepare of EXECUTE IMMEDIATE.
04 Statement is not recognized.
05 No statement string present.
06 Bad SQLDA format in parameter list.
07 SQLDA length is invalid.
08 Unrecognized input data type.
09 Invalid length for input variable.
10 Invalid data length for output variable.
11 The value of SQLDABC is not consistent with the value of SQLD.
12 Invalid input data pointer.
13 Invalid output data pointer.
14 SQLN has too many items for SQLDABC.
15 Input RDI pointer is invalid.
16 Unrecognized output data type.
17 The value of the 7th byte of SQLDAID is not consistent with the data types contained in the SQLDA. The SQLDA contains a LOB type host variable, but the 7th byte of SQLDAID is not set to2or greater to indicate that the extended SQLVARs have been allocated.
 
System action: The statement cannot be executed.
 
System programmer response: Examine the application program for any of the errors noted under the explanation above. In general, the application programmer should not attempt to modify the output of the precompiler.
SQLSTATE: 07002
Et pour info, nous n'avons pas de host variable commençant par SQL.

Merci d'avance.