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,大哥帮忙看看
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,大哥帮忙看看
解决方案 »
- 希望好手能帮我,谢谢!我白天提了这个问题。
- 请教CSDN的各位老大,这个问题的原因以及如何解决,叩谢!
- 请问 ORACLE Form Builder 怎么连接 SQL-SERVER 数据库! 急
- 关于oracle的数据异步复制问题。。救命啊~
- 求教:用oracmd链接oracle的问题
- 工作时间 计算问题
- 女朋友强烈要求我。。。。。。 但是 我不认输 进者给分 免费放送经典的娱乐搞笑 各位兄弟姐妹 你们辛苦了 工作之余 记得休息哦
- ****sql plus提示“找不到表或文件”的问题****
- 请问大家一个问题,快快帮帮我啊。。
- 通过occi接口执行存储过程,对于存储过程执行中获取的某些结果。如何通过occi接口取出
- ?
- 有几个传入参数,想当特定的几个参数不为null时,才更新其他几个参数,怎么办?
你的日志文件(是stdout吧?) 只有
iRowCount = :[0]
儿没有
iRowCount = :[1]
吗?