|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
Procedure problems.
EXEC SQL DECLARE CURSOR FOR ENTL_SOR
SELECT ID_LGCLFL, ID_EXTERNAL
FROM WHERE ID_PGM=:pcPromId; WK_ETNL
EXEC SQL OPEN ENTL_SOR;
If (sqlca.sqlcode ====== 0) (
Return 1;
}
Else{
Return -1
}
Database records did not meet the conditions, sqlca.sqlcode is zero, I do not know what are the reasons. Vernier has been opened before the sqlca.sqlcode is zero.
:?:
[/code] |
Procedure problems.
EXEC SQL OPEN ENTL_SOR;
If (sqlca.sqlcode ====== 0) (
4003rd Oracle database regardless of whether the data are returned 0, no data returned Sybase System 10
EXEC SQL : FETCH ENTL_SOR INTO. . . . . ;
If (sqlca.sqlcode ==0) (4003rd no data back to 1403 on Oracle |
Procedure problems.
First, thanks upstairs answer.
EXEC SQL : FETCH ENTL_SOR INTO. . . . . ;
This is not the time sqlcode==1403 no data (or not equal to 0)
I measured how sqlca.sqlcode ==0 (I use the Oracle)
COUSER Lane me how to judge if this is going to the data.
EXEC SQL : FETCH ENTL_SOR INTO. . . . . ;
If (sqlca.sqlcode ==0) (4003rd no data back to 1403 on Oracle |
Procedure problems.
OPEN successfully contained FETCH
If sqlca.sqlcode inquiries are ==0 then you explain to meet at least one of the conditions for the record |
Procedure problems.
Open cursor when the data is not accessible to the judgment, but this time not fetch data sqlca.sqlcode is 0 when the judge, this time the sqlca.sqlcode data is not 0.
[code]EXEC SQL DECLARE CURSOR FOR ENTL_SOR
SELECT ID_LGCLFL, ID_EXTERNAL
FROM WHERE ID_PGM=:pcPromId; WK_ETNL
EXEC SQL OPEN ENTL_SOR;
If (sqlca.sqlcode<0)
{
Error Handling
}
For (are;)
{
EXEC SQL : FETCH entl_sor INTO q_lIdLgclfl, q_lIdExternal; :
If (sqlca.sqlcode<0)
{
Error Handling
}
Else if (sqlca.sqlcode==1403)
{
Break;
}
}[/code] |
Procedure problems.
1403==SQLNOTFOUND |
Procedure problems.
Open Vernier, conducted fetch sentences, and then make a judgment call sqlcode, if no data Vernier, sqlcode=1403; If there is any information that would fetch sentence was executed correctly, sqlcode=0 |
| |