userlog("begin JF_QRY_SCORECHG"); memset(cSubscrbID,'\0',sizeof(cSubscrbID));
ptuxclient->Fget32 (__LINE__, SUBSCRBID, 0, cSubscrbID, (FLDLEN32 *) 0);
userlog("JF_QRY_SCORECHG:cSubscrbID=[%s]",cSubscrbID);
memset(cSqlStmt,'\0',sizeof(cSqlStmt));
sprintf(cSqlStmt,"select A.ScoreMonth,A.CancelTag,A.FeeScore,A.TotalScore,A.EnCashFeeScore,A.EnCashTotScore,to_char(A.UpdateTime,'yyyy-mm-dd hh24:mm:ss'),A.AcptSiteID,A.OptrID,to_char(A.CancelTime,'yyyy-mm-dd hh24:mm:ss'),A.CancelAcptSiteID,A.CancelOptrID,A.Re,B.CommodityName,A.AddFee,A.OptrSubscrbid,A.OptTypecode from Tab_ScoreChg A , Tab_Commodity B where  A.ComModiTyid(+)=B.ComModiTyid AND A.SubscrbID='%s'",cSubscrbID);
userlog("cSqlStmt=[%s]",cSqlStmt);
EXEC SQL PREPARE S FROM :cSqlStmt;
EXEC SQL DECLARE Cursor_S2 CURSOR FOR S;
EXEC SQL OPEN Cursor_S2;
if (sqlca.sqlcode)
{

memset(cErrStr,'\0',sizeof(cErrStr));
strcpy(cErrStr,sqlca.sqlerrm.sqlerrmc);
strcat(cErrStr,ltoa(sqlca.sqlcode));
userlog(cErrStr);
throw CException((char *)cErrStr);
}
iRowCount=0;
while (1)
{
memset(cScoreMonth,'\0',sizeof(cScoreMonth));
memset(cCancelTag,'\0',sizeof(cCancelTag));
memset(cFeeScore,'\0',sizeof(cFeeScore));
memset(cTotalScore,'\0',sizeof(cTotalScore));
memset(cEnCashFeeScore,'\0',sizeof(cEnCashFeeScore));
memset(cEnCashTotScore,'\0',sizeof(cEnCashTotScore));
memset(cUpdateTime,'\0',sizeof(cUpdateTime));
memset(cAcptSiteID,'\0',sizeof(cAcptSiteID));
memset(cOptrID,'\0',sizeof(cOptrID));
memset(cCancelTime,'\0',sizeof(cCancelTime));
memset(cCancelAcptSiteID,'\0',sizeof(cCancelAcptSiteID));
memset(cCancelOptrID,'\0',sizeof(cCancelOptrID));
memset(cRe,'\0',sizeof(cRe));
memset(cCommodityName,'\0',sizeof(cCommodityName));
memset(cAddFee,'\0',sizeof(cAddFee));
memset(cNewSvcNum,'\0',sizeof(cNewSvcNum));
        memset(cOptTypecode,'\0',sizeof(cOptTypecode));
                         userlog("iRowCount = :[%s]",ltoa(iRowCount));
EXEC SQL FETCH Cursor_S2 INTO :cScoreMonth,:cCancelTag,:cFeeScore,:cTotalScore,:cEnCashFeeScore,:cEnCashTotScore,:cUpdateTime,:cAcptSiteID,:cOptrID,:cCancelTime,:cCancelAcptSiteID,:cCancelOptrID,:cRe,:cCommodityName,:cAddFee,:cNewSvcNum,cOptTypecode;
if (sqlca.sqlcode != 0 && sqlca.sqlcode != -1405 && sqlca.sqlcode != 1403 )
{
        memset(cErrStr,'\0',sizeof(cErrStr));
strcpy(cErrStr,sqlca.sqlerrm.sqlerrmc);
strcat(cErrStr,ltoa(sqlca.sqlcode));
userlog(cErrStr);
throw CException((char *)cErrStr);
}

if (sqlca.sqlcode==1403)
 break;
//¿ªÊ¼·µ»Ø¿Í»§¶Ë
ptuxclient->Fchg32(__LINE__,SCOREMONTH,iRowCount,cScoreMonth,strlen(cScoreMonth));
ptuxclient->Fchg32(__LINE__,CANCELTAG,iRowCount,cCancelTag,strlen(cCancelTag));
ptuxclient->Fchg32(__LINE__,FEESCORE,iRowCount,cFeeScore,strlen(cFeeScore));
ptuxclient->Fchg32(__LINE__,TOTALSCORE,iRowCount,cTotalScore,strlen(cTotalScore));
ptuxclient->Fchg32(__LINE__,ENCASHFEESCORE,iRowCount,cEnCashFeeScore,strlen(cEnCashFeeScore));
ptuxclient->Fchg32(__LINE__,ENCASHTOTSCORE,iRowCount,cEnCashTotScore,strlen(cEnCashTotScore));
ptuxclient->Fchg32(__LINE__,UPDATETIME,iRowCount,cUpdateTime,strlen(cUpdateTime));
ptuxclient->Fchg32(__LINE__,ACPTSITEID,iRowCount,cAcptSiteID,strlen(cAcptSiteID));
ptuxclient->Fchg32(__LINE__,OPTRID,iRowCount,cOptrID,strlen(cOptrID));
ptuxclient->Fchg32(__LINE__,CANCELTIME,iRowCount,cCancelTime,strlen(cCancelTime));
ptuxclient->Fchg32(__LINE__,CANCELACPTSITEID,iRowCount,cCancelAcptSiteID,strlen(cCancelAcptSiteID));
ptuxclient->Fchg32(__LINE__,CANCELOPTRID,iRowCount,cCancelOptrID,strlen(cCancelOptrID));
ptuxclient->Fchg32(__LINE__,COMMODITYNAME,iRowCount,cCommodityName,strlen(cCommodityName));
ptuxclient->Fchg32(__LINE__,ADDFEE,iRowCount,cAddFee,strlen(cAddFee));
ptuxclient->Fchg32(__LINE__,NEWSVCNUM,iRowCount,cNewSvcNum,strlen(cNewSvcNum));
ptuxclient->Fchg32(__LINE__,OPTTYPECODE,iRowCount,cOptTypecode,strlen(cOptTypecode));
ptuxclient->Fchg32(__LINE__,REMARK,iRowCount,cRe,strlen(cRe));
iRowCount=iRowCount+1;上面的语句取数据单独执行是2条,可是光标中只有1条,555555555555,大哥帮忙看看