Commit 7f1c90c2 by 潘际乾

Platform.dbFetchFields函数赋值修改

parent b3a1c7fd
......@@ -39,7 +39,9 @@ event $dadrcv order 500
sql = Platform.sqlAndCondition( "INR = " + Platform.sqlLit( rcvKey ), Platform.sdbEtyGenTblSql( recTbl, "", "", "" ) );
inr = "";
Platform.dbExecuteSql( "select INR from " + recTbl + " " + sql );
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<>();
Platform.dbFetchFields( "", inrBox );
inr = inrBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound )
{
......
......@@ -294,7 +294,11 @@ String swtPrtMT103Body(#setgll argsetgll)
sql = "select extkey , seracc from act where serbic='" + rec53 + "' and OTHBIC='" + snd53 + "' AND TYP='DB' AND CUR='" + cur + "' ";
Platform.dbExecuteSql( sql );
error = Platform.errorCode();
Platform.dbFetchFields( "", extkey, "", seracc );
Argument<String> extkeyBox = new Argument<>();
Argument<String> seraccBox = new Argument<>();
Platform.dbFetchFields( "", extkeyBox, "", seraccBox );
extkey = extkeyBox.value;
seracc = seraccBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.isEmpty( $acc53b ) )
......
......@@ -7,7 +7,9 @@ void getacc53for202cov(String extkey,String covcur,Argument<String> covact)
{
sql = "select seracc from ACT where SERBIC='" + extkey + "' and cur='" + covcur + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", act );
Argument<String> actBox = new Argument<>();
Platform.dbFetchFields( "", actBox );
act = actBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -110,7 +110,11 @@ void getFepEntries(Argument<Boolean> argfirstcall)
Platform.dbExecuteSQL( "SELECT NAM,EXTKEY FROM PTY WHERE INR = ?", $wrkfep\ptyinr.getValue() );
ptynam = "";
ptyextkey = "";
Platform.dbFetchFields( "NAM", ptynam, "EXTKEY", ptyextkey );
Argument<String> ptynamBox = new Argument<>();
Argument<String> ptyextkeyBox = new Argument<>();
Platform.dbFetchFields( "NAM", ptynamBox, "EXTKEY", ptyextkeyBox );
ptynam = ptynamBox.value;
ptyextkey = ptyextkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -21,7 +21,8 @@ boolean isFeeCodSettled(String argfeecod,IModule arggrp)
else
{
Platform.dbExecuteSQL( "Select count(*) from FEP Where OBJTYP = ? AND OBJINR = ? AND FEECOD = ?", objTyp, objInr, argfeecod );
Platform.dbFetchFields( "", fepCnt );
Platform.dbFetchFields( "", fepCntBox );
fepCnt = fepCntBox.value;
Platform.dbCloseCursor();
Platform.cacheWrite( fepCnt, lbl );
}
......
......@@ -224,7 +224,9 @@ void registerSettlementCorrCha()
postfind = "";
postsql = "select REG from CTY where CTY.COD='" + loccty + "'";
Platform.dbExecuteSql( postsql );
Platform.dbFetchFields( "", postfind );
Argument<String> postfindBox = new Argument<>();
Platform.dbFetchFields( "", postfindBox );
postfind = postfindBox.value;
if( ! ( Platform.errorCode() == 228 ) )
{
switch( postfind )
......@@ -266,7 +268,9 @@ void registerSettlementCorrCha()
find = "";
sql = "select REG from CTY where CTY.COD='" + loccty + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", find );
Argument<String> findBox = new Argument<>();
Platform.dbFetchFields( "", findBox );
find = findBox.value;
/**
if not ( ErrorCode == 228 ) then
$line = StreamSearch( $DHLFEE, "DHL" + $FIND )
......
......@@ -122,7 +122,11 @@ void recalcSetfogBog()
Platform.dbExecuteSQL( "SELECT NAM,EXTKEY FROM PTY WHERE INR = ?", $wrkfcp\dbtptyinr.getValue() );
ptynam = "";
ptyextkey = "";
Platform.dbFetchFields( "NAM", ptynam, "EXTKEY", ptyextkey );
Argument<String> ptynamBox = new Argument<>();
Argument<String> ptyextkeyBox = new Argument<>();
Platform.dbFetchFields( "NAM", ptynamBox, "EXTKEY", ptyextkeyBox );
ptynam = ptynamBox.value;
ptyextkey = ptyextkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -46,7 +46,9 @@ void defActSub()
ptyInrSql = "select MAX(INR) from pty where extkey = '" + swfcod + "'";
Platform.dbExecuteSql( ptyInrSql );
err = Platform.errorCode();
Platform.dbFetchFields( "", ptyInr );
Argument<String> ptyInrBox = new Argument<>();
Platform.dbFetchFields( "", ptyInrBox );
ptyInr = ptyInrBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
//$actlst = \SETMOD\GLEMOD.GetAvailAcc ( DSP, ACCCUR, $ptyInr, self, AMT )
......
......@@ -41,7 +41,9 @@ default settlementdetail ($trdint,$trdout,$trnman,$xrttim,$buyrat,$selrat,$midra
sql = "select trnman from pty where inr = '" + $rolptyinr.getValue() + "'";
trnman = "";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", trnman );
Argument<String> trnmanBox = new Argument<>();
Platform.dbFetchFields( "", trnmanBox );
trnman = trnmanBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.isEmpty( trnman ) )
......
......@@ -20,7 +20,9 @@ default $branch order 1000
sql = "select branch from bch where inr in (select bchkeyinr from act where extkey='" + Platform.trim( $act.getValue() ) + "')";
Platform.dbExecuteSql( sql );
// DBFetchFields( "branch", $branch )
Platform.dbFetchFields( "branch", actbranch );
Argument<String> actbranchBox = new Argument<>();
Platform.dbFetchFields( "branch", actbranchBox );
actbranch = actbranchBox.value;
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -41,7 +41,9 @@ default $\setmod\setglg\setgll order 1000
err = Platform.errorCode();
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", zmzjcflg );
Argument<String> zmzjcflgBox = new Argument<>();
Platform.dbFetchFields( "", zmzjcflgBox );
zmzjcflg = zmzjcflgBox.value;
err = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -29,7 +29,9 @@ event $setpan order 3000
idtype = "";
sql = "select idtype from pty where extkey='" + extkey + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", idtype );
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", idtypeBox );
idtype = idtypeBox.value;
err = Platform.errorCode();
if( Platform.compareTo( idtype , "D" ) == 0 || Platform.compareTo( idtype , "F" ) == 0 )
{
......
......@@ -2,7 +2,7 @@ void getSwfcodTelFax(Argument<String> swfcod,Argument<String> tel,Argument<Strin
{
String strsql = "select swfcod,tel,fax from bch where lev='0'";
Platform.dbExecuteSql( strsql );
Platform.dbFetchFields( "", swfcod.value, "", tel.value, "", fax.value );
Platform.dbFetchFields( "", swfcod, "", tel, "", fax );
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -5,13 +5,13 @@ void getbchanaccbch(String bchinr,String accbchinr,Argument<String> bchkey,Argum
String sqlstr = "select branch from bch where inr='" + vbchinr + "'";
String sqlstr1 = "select branch from bch where inr='" + vaccbchinr + "'";
Platform.dbExecuteSql( sqlstr );
Platform.dbFetchFields( "", bchkey.value );
Platform.dbFetchFields( "", bchkey );
if( Platform.errorCode() <= 0 )
{
}
Platform.dbCloseCursor();
Platform.dbExecuteSql( sqlstr1 );
Platform.dbFetchFields( "", accbch.value );
Platform.dbFetchFields( "", accbch );
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -76,7 +76,9 @@ void getACTInformation_set()
{
branch = "";
Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() );
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
// $Ret = \SYSMOD.CallInterface ( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt )
......
......@@ -15,7 +15,9 @@ static void getaccbank(String ptyextkey)
sql = "select bchkeyinr from act where serptyinr in (select inr from pty where extkey='" + ptyextkey + "') AND TYP='DB' AND CUR='" + cur + "' ";
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<>();
Platform.dbFetchFields( "", inrBox );
inr = inrBox.value;
err = Platform.errorCode();
// if not IsEmpty( $INR ) then
Platform.dbRead( $\setmod\actbch, " WHERE INR='" + inr + "'" );
......
......@@ -39,7 +39,11 @@ void getClrAmt(Argument<Integer> clramt)
objinr = "";
sql = "select objtyp,objinr from ORD WHERE INR='" + ordinr + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", objtyp, "", objinr );
Argument<String> objtypBox = new Argument<>();
Argument<String> objinrBox = new Argument<>();
Platform.dbFetchFields( "", objtypBox, "", objinrBox );
objtyp = objtypBox.value;
objinr = objinrBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( ! Platform.isEmpty( objtyp ) && ! Platform.isEmpty( objinr ) )
......@@ -65,7 +69,11 @@ void getClrAmt(Argument<Integer> clramt)
if( ! Platform.isEmpty( sqlclr ) )
{
Platform.dbExecuteSql( sqlclr );
Platform.dbFetchFields( "", cur, "", amt );
Argument<String> curBox = new Argument<>();
Argument<Integer> amtBox = new Argument<>();
Platform.dbFetchFields( "", curBox, "", amtBox );
cur = curBox.value;
amt = amtBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -4,7 +4,9 @@ void existFCD()
String fcdSql = "select INR from FCD where PNTTYP='SPT' AND PNTINR = ?";
String fcdInr = "";
Platform.dbExecuteSQL( fcdSql, $spt\inr.getValue() );
Platform.dbFetchFields( "", fcdInr );
Argument<String> fcdInrBox = new Argument<>();
Platform.dbFetchFields( "", fcdInrBox );
fcdInr = fcdInrBox.value;
Platform.dbCloseCursor();
if( Platform.compareTo(fcdInr, "") != 0 )
{
......
......@@ -3,7 +3,7 @@ void getOreCre(Argument<String> creusr,Argument<String> bchkeyinr)
creusr.value = "";
bchkeyinr.value = "";
Platform.dbExecuteSQL( "select USR, BCHKEYINR from ORE where ORDINR = ? and typ='CRE' ", $\ordmod\ord\inr.getValue() );
Platform.dbFetchFields( "", creusr.value, "", bchkeyinr.value );
Platform.dbFetchFields( "", creusr, "", bchkeyinr );
Platform.dbCloseCursor();
}
\ No newline at end of file
......@@ -30,7 +30,9 @@ void check103Msg()
sql = "SELECT RELFLG FROM TRN WHERE OBJTYP = 'CLR' AND INIFRM = 'CLIOPN' AND OBJINR = '" + $clr\inr.getValue() + "' AND RELFLG IN ('W', 'F', 'R')";
relFlg = "";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", relFlg );
Argument<String> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( relFlg , "W" ) == 0 )
......
......@@ -9,7 +9,11 @@ void autoBindCshMsg()
String sptinr202 = "";
String smhinr202 = "";
Platform.dbExecuteSQL( "select inr,smhinr from spt where objref like ? and relcur=? and relamt=? and objtyp=? and msgtyp in ('202','910') and delflg=' '", ref103 + "%", $\spt\relcur.getValue(), $\spt\relamt.getValue(), $\spt\objtyp.getValue() );
Platform.dbFetchFields( "", sptinr202, "", smhinr202 );
Argument<String> sptinr202Box = new Argument<>();
Argument<String> smhinr202Box = new Argument<>();
Platform.dbFetchFields( "", sptinr202Box, "", smhinr202Box );
sptinr202 = sptinr202Box.value;
smhinr202 = smhinr202Box.value;
Platform.dbCloseCursor();
int can = 0;
if( Platform.errorCode() == 0 )
......
......@@ -33,7 +33,9 @@ event $unbind order 1000
if( Platform.prompt( #CT000151 ) )
{
Platform.dbExecuteSQL( "select inr from smh where grpinr = ? and msgtyp in ('202','910')", $\spt\smhinr.getValue() );
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<>();
Platform.dbFetchFields( "", inrBox );
inr = inrBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() == 0 )
{
......
......@@ -15,7 +15,9 @@ void deleteClearMsg()
sta = "";
Platform.dbExecuteSQL( "select sta from clr where srctyp='SPT' and srcinr=?", sptinr );
err = Platform.errorCode();
Platform.dbFetchFields( "", sta );
Argument<String> staBox = new Argument<>();
Platform.dbFetchFields( "", staBox );
sta = staBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.compareTo( sta , "E" ) == 0 )
......@@ -33,7 +35,9 @@ void deleteClearMsg()
relflg = "";
Platform.dbExecuteSQL( "select relflg from (select relflg from trn where objtyp = 'CLR' and objinr = (select inr from clr where srctyp = 'SPT' and srcinr = ? ) order by inr desc ) where rownum = 1 ", sptinr );
err = Platform.errorCode();
Platform.dbFetchFields( "", relflg );
Argument<String> relflgBox = new Argument<>();
Platform.dbFetchFields( "", relflgBox );
relflg = relflgBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( ! Platform.isEmpty( relflg ) )
......
......@@ -5,7 +5,9 @@ void updateMsgSta103(String smhinr)
Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "select sta from clr where smhinr=?", smhinr );
int err = Platform.errorCode();
Platform.dbFetchFields( "", sta );
Argument<String> staBox = new Argument<>();
Platform.dbFetchFields( "", staBox );
sta = staBox.value;
Platform.dbCloseCursor();
String sql = NULLSTR;
if( Platform.errorCode() == 0 )
......
......@@ -32,7 +32,13 @@ void setSmhFieldsForTco(IStream argstm)
if( ! Platform.isEmpty( smhInr ) )
{
Platform.dbExecuteSQL( "select MSGTYP, SNDKEY, RELCUR, RELAMT from SMH where INR = ?", smhInr );
Platform.dbFetchFields( "", msgTyp, "", sndKey, "", relCur, "", relAmt );
Argument<String> msgTypBox = new Argument<>();
Argument<String> sndKeyBox = new Argument<>();
Argument<String> relCurBox = new Argument<>();
Platform.dbFetchFields( "", msgTypBox, "", sndKeyBox, "", relCurBox, "", relAmt );
msgTyp = msgTypBox.value;
sndKey = sndKeyBox.value;
relCur = relCurBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound )
{
......
......@@ -12,7 +12,9 @@ void delEntryWithoutRelease()
relflg = "";
Platform.dbExecuteSQL( "select relflg from trn where inr in (select creobjinr from spt where creobjtyp='TRN' and inr=? )", sptinr );
err = Platform.errorCode();
Platform.dbFetchFields( "", relflg );
Argument<String> relflgBox = new Argument<>();
Platform.dbFetchFields( "", relflgBox );
relflg = relflgBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.compareTo(relflg, "R") != 0 && Platform.compareTo(relflg, "F") != 0 )
......
......@@ -26,7 +26,9 @@ void addRcvBch2Stm(IStream argstm)
sptinr1 = Platform.getStreamfield( line, 1, "\t" );
sqlhinmsg = sqlbopnet + Platform.sqlLit( sptinr1 );
Platform.dbExecuteSql( sqlhinmsg );
Platform.dbFetchFields( "", hinmsg );
Argument<String> hinmsgBox = new Argument<>();
Platform.dbFetchFields( "", hinmsgBox );
hinmsg = hinmsgBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
//###############################
......@@ -36,7 +38,9 @@ void addRcvBch2Stm(IStream argstm)
sql = "select bchname from bch where inr in (select bchkeyinr from spt where inr=" + Platform.sqlLit( sptinr ) + ")";
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", bchnam );
Argument<String> bchnamBox = new Argument<>();
Platform.dbFetchFields( "", bchnamBox );
bchnam = bchnamBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
//$line = $line + TAB + $bchnam
......
......@@ -14,11 +14,17 @@ default $usrcon order 1000
Platform.streamClear( b );
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( bchsql );
Platform.dbFetchFields( "", extkey, "", nam );
Argument<String> extkeyBox = new Argument<>();
Argument<String> namBox = new Argument<>();
Platform.dbFetchFields( "", extkeyBox, "", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
while( Platform.errorCode() == 0 )
{
Platform.streamInsert( b, 0, extkey + "\t" + nam );
Platform.dbFetchFields( "", extkey, "", nam );
Platform.dbFetchFields( "", extkeyBox, "", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
}
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -42,7 +42,9 @@ event $delnet order 1000
{
sqlSptExtkey = "Select extkey from spt where inr = " + Platform.sqlLit( sptInr );
Platform.dbExecuteSql( sqlSptExtkey );
Platform.dbFetchFields( "", extkey );
Argument<String> extkeyBox = new Argument<>();
Platform.dbFetchFields( "", extkeyBox );
extkey = extkeyBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
/**if IsEmpty( SPT\EXTKEY ) then
......@@ -63,7 +65,17 @@ event $delnet order 1000
fax2 = "";
idtype = "";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype );
Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
//#########
......
......@@ -42,7 +42,9 @@ default $delnet order 1000
error = Platform.errorCode();
if( error == 0 )
{
Platform.dbFetchFields( "", cortyp );
Argument<String> cortypBox = new Argument<>();
Platform.dbFetchFields( "", cortypBox );
cortyp = cortypBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( cortyp , "TCO" ) == 0 && Platform.compareTo( $selfrm.getValue() , "CPTOPN" ) == 0 )
......@@ -66,7 +68,9 @@ default $delnet order 1000
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", nbsaplref );
Argument<String> nbsaplrefBox = new Argument<>();
Platform.dbFetchFields( "", nbsaplrefBox );
nbsaplref = nbsaplrefBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
Platform.sqlSetCommittedRead();
......
......@@ -13,7 +13,13 @@ static void getNraHzBank(IStream branch)
{
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname );
Argument<String> inrBox = new Argument<>();
Argument<String> vbranchBox = new Argument<>();
Argument<String> bCHnameBox = new Argument<>();
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
while( Platform.errorCode() == 0 )
{
if( Platform.isEmpty( values ) )
......@@ -25,7 +31,10 @@ static void getNraHzBank(IStream branch)
values = values + "\r\n" + inr;
}
Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname );
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
}
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -96,7 +96,9 @@ event $bakbut order 1000
smhinr = "";
sql = "select smhinr from spt where inr = '" + sptinr + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", smhinr );
Argument<String> smhinrBox = new Argument<>();
Platform.dbFetchFields( "", smhinrBox );
smhinr = smhinrBox.value;
err = Platform.errorCode();
if( err != 0 || err != tdOdbcNotFound )
{
......@@ -110,7 +112,9 @@ event $bakbut order 1000
// $sql = "select FPSSID from smh where inr='RG000525
sql = "select FPSSID from fps where tranid='RECIEVE' and trim(filnam)=(select trim(docfil) || '.' || trim(docfxt) from smh where inr='" + smhinr + "')";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", fpssid );
Argument<String> fpssidBox = new Argument<>();
Platform.dbFetchFields( "", fpssidBox );
fpssid = fpssidBox.value;
err = Platform.errorCode();
if( err != 0 && err != tdOdbcNotFound )
{
......
......@@ -29,7 +29,23 @@ event onPanelShow $smscpol2 order 100
sql = "Select TELNO,TELNO2,ERRCODE,ERRORMSG,ERRCODE2,ERRORMSG2,SMSTXT,SNDDAT from sms where sptinr=" + Platform.sqlLit( sptinr );
Platform.dbExecuteSql( sql );
tmpresult = "";
Platform.dbFetchFields( "", telno1, "", telno2, "", errcode, "", errormsg, "", errcode2, "", errormsg2, "", smstxt, "", snddat );
Argument<String> telno1Box = new Argument<>();
Argument<String> telno2Box = new Argument<>();
Argument<String> errcodeBox = new Argument<>();
Argument<String> errormsgBox = new Argument<>();
Argument<String> errcode2Box = new Argument<>();
Argument<String> errormsg2Box = new Argument<>();
Argument<String> smstxtBox = new Argument<>();
Argument<String> snddatBox = new Argument<>();
Platform.dbFetchFields( "", telno1Box, "", telno2Box, "", errcodeBox, "", errormsgBox, "", errcode2Box, "", errormsg2Box, "", smstxtBox, "", snddatBox );
telno1 = telno1Box.value;
telno2 = telno2Box.value;
errcode = errcodeBox.value;
errormsg = errormsgBox.value;
errcode2 = errcode2Box.value;
errormsg2 = errormsg2Box.value;
smstxt = smstxtBox.value;
snddat = snddatBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -197,12 +197,18 @@ event $prtbop order 1000
{
sql = "select nam1 from pty where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", nam1 );
Argument<String> nam1Box = new Argument<>();
Platform.dbFetchFields( "", nam1Box );
nam1 = nam1Box.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
sql = "select tel2 , fax2 from adr where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", tel, "", fax2 );
Argument<String> telBox = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Platform.dbFetchFields( "", telBox, "", fax2Box );
tel = telBox.value;
fax2 = fax2Box.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -17,7 +17,9 @@ event $save order 1000
sql = "select extkey from pty where EXTKEY='" + $newextkey.getValue() + "'";
Platform.dbExecuteSql( sql );
relFlg = "";
Platform.dbFetchFields( "", relFlg );
Argument<String> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.isEmpty( relFlg ) )
......
......@@ -236,12 +236,18 @@ event $vewbop order 1000
{
sql = "select nam1 from pty where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", nam1 );
Argument<String> nam1Box = new Argument<>();
Platform.dbFetchFields( "", nam1Box );
nam1 = nam1Box.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
sql = "select tel2 , fax2 from adr where extkey = ? ";
Platform.dbExecuteSQL( sql, $spt\extkey.getValue() );
Platform.dbFetchFields( "", tel, "", fax2 );
Argument<String> telBox = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Platform.dbFetchFields( "", telBox, "", fax2Box );
tel = telBox.value;
fax2 = fax2Box.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -23,14 +23,24 @@ void delete910or202BindMsg()
frm = "";
Platform.dbExecuteSQL( " select smhinr , delflg , msgtyp,frm from spt where inr = ? and msgtyp in ('202','910') ", sptinr );
err = Platform.errorCode();
Platform.dbFetchFields( "", smhinr, "", delflg, "", msgtyp, "", frm );
Argument<String> smhinrBox = new Argument<>();
Argument<String> delflgBox = new Argument<>();
Argument<String> msgtypBox = new Argument<>();
Argument<String> frmBox = new Argument<>();
Platform.dbFetchFields( "", smhinrBox, "", delflgBox, "", msgtypBox, "", frmBox );
smhinr = smhinrBox.value;
delflg = delflgBox.value;
msgtyp = msgtypBox.value;
frm = frmBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.isEmpty( delflg ) && ( Platform.compareTo( msgtyp , "910" ) == 0 || Platform.compareTo( msgtyp , "202" ) == 0 ) && Platform.compareTo( frm , "CPTADV" ) == 0 )
{
Platform.dbExecuteSQL( "select inr from smh where grpinr = ( select grpinr from smh where inr= ? ) and grpinr != ' ' and msgtyp='103' ", smhinr );
err = Platform.errorCode();
Platform.dbFetchFields( "", v103inr );
Argument<String> v103inrBox = new Argument<>();
Platform.dbFetchFields( "", v103inrBox );
v103inr = v103inrBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( ! Platform.isEmpty( v103inr ) )
......
......@@ -4,7 +4,9 @@ void addnewsptforcnd()
String sql = "select * from ACT where typ not in('LO') AND EXTKEY='" + $cndp1\cnd\pyeact.getValue() + "'";
Platform.dbExecuteSql( sql );
int relFlg = 0;
Platform.dbFetchFields( "", relFlg );
Argument<Integer> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
int ignore = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( $cndp1\cnd\systyp , "HVPS" ) == 0 )
......
......@@ -22,7 +22,9 @@ default $buttco order 1000
error = Platform.errorCode();
if( error == 0 )
{
Platform.dbFetchFields( "", msgtyp );
Argument<String> msgtypBox = new Argument<>();
Platform.dbFetchFields( "", msgtypBox );
msgtyp = msgtypBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -56,7 +56,9 @@ void gettcoinfo(String filename)
rptno = "";
if( error == 0 )
{
Platform.dbFetchFields( "", rptno );
Argument<String> rptnoBox = new Argument<>();
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -15,7 +15,11 @@ event $query order 1000
Platform.dbExecuteSql( sql );
relFlg = "";
relNam = "";
Platform.dbFetchFields( "", relFlg, "", relNam );
Argument<String> relFlgBox = new Argument<>();
Argument<String> relNamBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox, "", relNamBox );
relFlg = relFlgBox.value;
relNam = relNamBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
if( ! Platform.isEmpty( relFlg ) )
......
......@@ -8,7 +8,9 @@ static String setTelno(String inr)
{
sql = "Select t21tel33n from Spt where inr =" + Platform.sqlLit( sptInr );
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", telno );
Argument<String> telnoBox = new Argument<>();
Platform.dbFetchFields( "", telnoBox );
telno = telnoBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
return telno;
......
......@@ -7,7 +7,9 @@ static String selectNam(String inr)
{
sql = "Select T21BEN59 from Spt where inr =" + Platform.sqlLit( inr );
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", t21ben59 );
Argument<String> t21ben59Box = new Argument<>();
Platform.dbFetchFields( "", t21ben59Box );
t21ben59 = t21ben59Box.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
return t21ben59;
......
......@@ -27,7 +27,25 @@ void smshmdsnd()
smhF21 = Platform.mid( smhF21, 1, 2 );
String act59 = Platform.trim( $spt\act59.getValue() );
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype, "", tel4, "", fax4, "", tel5, "", fax5 );
Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Argument<String> tel4Box = new Argument<>();
Argument<String> fax4Box = new Argument<>();
Argument<String> tel5Box = new Argument<>();
Argument<String> fax5Box = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox, "", tel4Box, "", fax4Box, "", tel5Box, "", fax5Box );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
tel4 = tel4Box.value;
fax4 = fax4Box.value;
tel5 = tel5Box.value;
fax5 = fax5Box.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
switch( smhF21 )
......
......@@ -57,7 +57,13 @@ event $smsbut order 1000
tmpsql = "select extkey,ACT59,F50ADR from spt where inr =" + Platform.sqlLit( tmpsptinr );
Platform.dbExecuteSql( tmpsql );
tmpresult = "";
Platform.dbFetchFields( "", tmpresult, "", act59, "", v50nam );
Argument<String> tmpresultBox = new Argument<>();
Argument<String> act59Box = new Argument<>();
Argument<String> v50namBox = new Argument<>();
Platform.dbFetchFields( "", tmpresultBox, "", act59Box, "", v50namBox );
tmpresult = tmpresultBox.value;
act59 = act59Box.value;
v50nam = v50namBox.value;
ignore1 = Platform.errorCode();
$spt\extkey = tmpresult;
$spt\inr = tmpsptinr;
......@@ -81,7 +87,17 @@ event $smsbut order 1000
fax2 = "";
idtype = "";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype );
Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
$telno = tel2;
......@@ -159,7 +175,11 @@ event $smsbut order 1000
sbtjzt = Platform.getStreamfield( line, 27, "\t" );
extkeysql = "select extkey,(Select IDTYPE from pty where extkey = spt.extkey ) from spt where inr =" + Platform.sqlLit( tmpsptinr );
Platform.dbExecuteSql( extkeysql );
Platform.dbFetchFields( "", sptExtkey, "", ptyIdType );
Argument<String> sptExtkeyBox = new Argument<>();
Argument<String> ptyIdTypeBox = new Argument<>();
Platform.dbFetchFields( "", sptExtkeyBox, "", ptyIdTypeBox );
sptExtkey = sptExtkeyBox.value;
ptyIdType = ptyIdTypeBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
// 客户号为空,发送状态为"未发送","发送失败",提交状态为"已提交",客户类型为非对公客户 则不支持批量短信重发。
......@@ -199,7 +219,13 @@ event $smsbut order 1000
tmpsql = "select extkey,ACT59,F50ADR from spt where inr =" + Platform.sqlLit( tmpsptinr );
Platform.dbExecuteSql( tmpsql );
tmpresult = "";
Platform.dbFetchFields( "", tmpresult, "", act59, "", v50nam );
Argument<String> tmpresultBox = new Argument<>();
Argument<String> act59Box = new Argument<>();
Argument<String> v50namBox = new Argument<>();
Platform.dbFetchFields( "", tmpresultBox, "", act59Box, "", v50namBox );
tmpresult = tmpresultBox.value;
act59 = act59Box.value;
v50nam = v50namBox.value;
ignore1 = Platform.errorCode();
$spt\extkey = tmpresult;
$spt\inr = tmpsptinr;
......@@ -212,7 +238,17 @@ event $smsbut order 1000
fax2 = "";
idtype = "";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype );
Argument<String> tel2Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> adr2Box = new Argument<>();
Argument<String> fax2Box = new Argument<>();
Argument<String> idtypeBox = new Argument<>();
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2 = tel2Box.value;
adr1 = adr1Box.value;
adr2 = adr2Box.value;
fax2 = fax2Box.value;
idtype = idtypeBox.value;
ignore = Platform.errorCode();
Platform.dbCloseCursor();
$telno = tel2;
......
......@@ -38,7 +38,19 @@ void setSmhFields(IStream argstm)
if( ! Platform.isEmpty( smhInr ) )
{
Platform.dbExecuteSQL( "select MSGTYP, SNDKEY, RELCUR, RELAMT,PRTFLG,PRTUSR , F121 from SMH where INR = ?", smhInr );
Platform.dbFetchFields( "", msgTyp, "", sndKey, "", relCur, "", relAmt, "", prtflg, "", prtusr, "", f121 );
Argument<String> msgTypBox = new Argument<>();
Argument<String> sndKeyBox = new Argument<>();
Argument<String> relCurBox = new Argument<>();
Argument<String> prtflgBox = new Argument<>();
Argument<String> prtusrBox = new Argument<>();
Argument<String> f121Box = new Argument<>();
Platform.dbFetchFields( "", msgTypBox, "", sndKeyBox, "", relCurBox, "", relAmt, "", prtflgBox, "", prtusrBox, "", f121Box );
msgTyp = msgTypBox.value;
sndKey = sndKeyBox.value;
relCur = relCurBox.value;
prtflg = prtflgBox.value;
prtusr = prtusrBox.value;
f121 = f121Box.value;
Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound )
{
......
......@@ -19,7 +19,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
inifrmSql = "select inifrm from trn where inr = '" + vtrninr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( inifrmSql );
Platform.dbFetchFields( "", retunInifrm );
Argument<String> retunInifrmBox = new Argument<>();
Platform.dbFetchFields( "", retunInifrmBox );
retunInifrm = retunInifrmBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -10,7 +10,9 @@ void cliSaveTRN()
String sql = "SELECT INR FROM BCH WHERE BRANCH = '" + $heq\accbch.getValue() + "'";
String accBchInr = "";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", accBchInr );
Argument<String> accBchInrBox = new Argument<>();
Platform.dbFetchFields( "", accBchInrBox );
accBchInr = accBchInrBox.value;
int ignore = Platform.errorCode();
$trn\accbchinr = accBchInr;
$trn\branchinr = $heq\inr;
......
......@@ -31,7 +31,11 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", objTyp, "", objInr );
Argument<String> objTypBox = new Argument<>();
Argument<String> objInrBox = new Argument<>();
Platform.dbFetchFields( "", objTypBox, "", objInrBox );
objTyp = objTypBox.value;
objInr = objInrBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -9,7 +9,9 @@ String getSmhInr(String argtrninr)
}
else
{
Platform.dbFetchFields( "", smhinr );
Argument<String> smhinrBox = new Argument<>();
Platform.dbFetchFields( "", smhinrBox );
smhinr = smhinrBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -113,7 +113,15 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sql = "select adr.tel3 , adr.adr1 , adr.fax3 , led.amenbr from adr , pts , led where adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='LED' aND pts.OBJINR='" + objinr + "' and pts.rol='BEN' and led.inr=pts.OBJINR ";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", amenbr );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> amenbrBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", amenbrBox );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
amenbr = amenbrBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -128,7 +136,11 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sql = "select cbe.amt,cbe.cur from trn , cbe where trn.inifrm='LETOPN' and trn.ownref='" + ownref + "' and trn.relflg in('F','R') and cbe.trninr=trn.inr and cbe.extid='AMT1' AND cbe.CBT='NOMAMT' ";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", amt, "", cur );
Argument<String> amtBox = new Argument<>();
Argument<String> curBox = new Argument<>();
Platform.dbFetchFields( "", amtBox, "", curBox );
amt = amtBox.value;
cur = curBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -141,7 +153,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sqltrd = "select count(*) from TRD where pnttyp='BED' and pntinr='" + objinr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqltrd );
Platform.dbFetchFields( "", count );
Argument<Integer> countBox = new Argument<>();
Platform.dbFetchFields( "", countBox );
count = countBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -150,7 +164,15 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sql = "select adr.tel4 , adr.adr1 , adr.fax4 ,PTS.REF from adr , pts , BED where adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='BED' aND pts.OBJINR='" + objinr + "' and pts.rol='BEN' and BED.inr=pts.OBJINR ";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -170,7 +192,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sqltrd = "select count(*) from TRD where PNTtyp='BTD' and pntinr='" + objinr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqltrd );
Platform.dbFetchFields( "", count );
Argument<Integer> countBox = new Argument<>();
Platform.dbFetchFields( "", countBox );
count = countBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -179,14 +203,24 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sql = "select adr.tel4 , adr.adr1 , adr.fax4 ,PTS.REF from adr , pts , BTD where adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='BTD' aND pts.OBJINR='" + objinr + "' and pts.rol='BE1' and BTD.inr=pts.OBJINR ";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1, "", refBox );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
sqlamt = "select CUR,AMT from cbb where objtyp='BTD' and objinr='" + objinr + "' and extid='BE1AMT1' and CBC='MAXSUM'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqlamt );
Platform.dbFetchFields( "", reloricur, "", reloriamt );
Argument<String> reloricurBox = new Argument<>();
Platform.dbFetchFields( "", reloricurBox, "", reloriamt );
reloricur = reloricurBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -199,7 +233,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sqltrd = "select count(*) from TRD where PNTtyp='BOD' and pntinr='" + objinr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqltrd );
Platform.dbFetchFields( "", count );
Argument<Integer> countBox = new Argument<>();
Platform.dbFetchFields( "", countBox );
count = countBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -208,7 +244,15 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sql = "select adr.tel5 , adr.adr1 , adr.fax5 ,PTS.REF from adr , pts , BOD where adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='BOD' aND pts.OBJINR='" + objinr + "' and pts.rol='DRR' and BOD.inr=pts.OBJINR";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1, "", refBox );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -228,7 +272,16 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sql = "select adr.tel6 , adr.adr1 , adr.fax6 ,LID.ownref,BRD.ORDPAYDAT from adr , pts , LID,BRD where adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='BRD' aND pts.OBJINR=BRD.inr and pts.rol='APL' and BRD.inr=pts.OBJINR and BRD.inr='" + objinr + "'" + " and LID.inr=BRD.PNTINR and BRD.PNTTYP='LID'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
// Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox, "", paydat );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -240,7 +293,15 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
paydat = Platform.today();
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox, "", paydat );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -252,7 +313,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sqltrd = "select count(*) from TRD where PNTtyp='BRD' and pntinr='" + objinr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqltrd );
Platform.dbFetchFields( "", count );
Argument<Integer> countBox = new Argument<>();
Platform.dbFetchFields( "", countBox );
count = countBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -262,7 +325,15 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
paydat = Platform.today();
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox, "", paydat );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -275,7 +346,9 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
sqltrd = "select count(*) from TRD where PNTtyp='BCD' and pntinr='" + objinr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqltrd );
Platform.dbFetchFields( "", count );
Argument<Integer> countBox = new Argument<>();
Platform.dbFetchFields( "", countBox );
count = countBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -285,7 +358,15 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
paydat = Platform.today();
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
Argument<String> tel1Box = new Argument<>();
Argument<String> adr1Box = new Argument<>();
Argument<String> fax1Box = new Argument<>();
Argument<String> refBox = new Argument<>();
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox, "", paydat );
tel1 = tel1Box.value;
adr1 = adr1Box.value;
fax1 = fax1Box.value;
ref = refBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -15,7 +15,11 @@ void getGLErelAMT(String inifrm,String trninr,Argument<String> reloricur,Argumen
default:
}
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", glecur, "", gleamt );
Argument<String> glecurBox = new Argument<>();
Argument<Integer> gleamtBox = new Argument<>();
Platform.dbFetchFields( "", glecurBox, "", gleamtBox );
glecur = glecurBox.value;
gleamt = gleamtBox.value;
int err = Platform.errorCode();
Platform.dbCloseCursor();
if( ! Platform.isEmpty( glecur ) && gleamt != 0 )
......
......@@ -5,7 +5,9 @@ static void gethndtyp(String objtyp,String objinr,Argument<String> hndtyp)
Platform.dbExecuteSql( "select hndtyp from " + objtyp + " where inr='" + objinr + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vhndtyp );
Argument<String> vhndtypBox = new Argument<>();
Platform.dbFetchFields( "", vhndtypBox );
vhndtyp = vhndtypBox.value;
if( Platform.errorCode() <= 0 )
{
hndtyp.value = vhndtyp;
......
......@@ -28,7 +28,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
if( ! Platform.isEmpty( objinr ) && ! Platform.isEmpty( arc ) )
{
Platform.dbExecuteSql( "select BCHKEYINR from " + arc + " where INR = " + Platform.sqlLit( objinr ) );
Platform.dbFetchFields( "", bchkeyinr );
Argument<String> bchkeyinrBox = new Argument<>();
Platform.dbFetchFields( "", bchkeyinrBox );
bchkeyinr = bchkeyinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -37,7 +39,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
}
String vbchkey = "";
Platform.dbExecuteSql( "select bchkey from bch where INR = " + Platform.sqlLit( bchkeyinr ) );
Platform.dbFetchFields( "", vbchkey );
Argument<String> vbchkeyBox = new Argument<>();
Platform.dbFetchFields( "", vbchkeyBox );
vbchkey = vbchkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -62,7 +66,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
Platform.dbExecuteSql( "select upbranch from bch where bchkey='" + $\sysmod\bch\bchkey.getValue() + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", upbranch );
Argument<String> upbranchBox = new Argument<>();
Platform.dbFetchFields( "", upbranchBox );
upbranch = upbranchBox.value;
if( Platform.compareTo( vbchkey , upbranch ) == 0 && Platform.errorCode() == 0 )
{
checkbch.value = true;
......@@ -85,7 +91,7 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
Platform.dbExecuteSql( "select nam1 from pty where extkey='" + extkey + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", nam1.value );
Platform.dbFetchFields( "", nam1 );
if( Platform.errorCode() != 0 )
{
// nam1 = 'R0000006
......@@ -101,7 +107,9 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
if( Platform.errorCode() <= 0 )
{
// DBFetchFields( "", $newinr )
Platform.dbFetchFields( "", ptyinr );
Argument<String> ptyinrBox = new Argument<>();
Platform.dbFetchFields( "", ptyinrBox );
ptyinr = ptyinrBox.value;
if( Platform.errorCode() != 0 )
{
ptyinr = " ";
......@@ -112,7 +120,7 @@ void getTrnPtyNam(String newinr,String objinr,String arc,String bchkey,String ex
Platform.dbExecuteSql( "select nam1 from pty where inr='" + ptyinr + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", nam1.value );
Platform.dbFetchFields( "", nam1 );
if( Platform.errorCode() != 0 )
{
nam1.value = #CT000010;
......
void getcpdetail(String objtyp,String objinr,Argument<String> paybank,Argument<String> orcnam,Argument<String> paytyp)
{
String vpaybank = "";
String vorcnam = "";
String vpaytyp = "";
// String vpaybank = "";
// String vorcnam = "";
// String vpaytyp = "";
if( Platform.compareTo( objtyp , "CPD" ) == 0 )
{
// DBRead( \BIMEMU\CPDGRP\REC, "where inr=" + objinr )
Platform.dbExecuteSql( "select pybnam,orcnam,paytyp from cpd where inr='" + objinr + "'" );
Platform.dbFetchFields( "", vpaybank, "", vorcnam, "", vpaytyp );
paybank.value = vpaybank;
orcnam.value = vorcnam;
paytyp.value = vpaytyp;
Platform.dbFetchFields( "", paybank, "", orcnam, "", paytyp );
// paybank.value = vpaybank;
// orcnam.value = vorcnam;
// paytyp.value = vpaytyp;
if( Platform.errorCode() != 0 )
{
vorcnam = #CT000012;
// vorcnam = #CT000012;
orcnam.value = #CT000012;
}
Platform.dbCloseCursor();
}
......
......@@ -24,7 +24,11 @@ void subpenaType(String act,String dbtcdt,String trmtyp)
int ignore = 0;
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", sacttrmcod, "", snam );
Argument<String> sacttrmcodBox = new Argument<>();
Argument<String> snamBox = new Argument<>();
Platform.dbFetchFields( "", sacttrmcodBox, "", snamBox );
sacttrmcod = sacttrmcodBox.value;
snam = snamBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -17,7 +17,11 @@ static void getTermTypField_subp(String trmtyp,Argument<String> act_id,Argument<
Platform.dbExecuteSql( "SELECT TRMTYP, NAM FROM TRM WHERE TRMCOD ='" + trmtyp + "'" );
while( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "TRMTYP", strmtyp, "NAM", snam );
Argument<String> strmtypBox = new Argument<>();
Argument<String> snamBox = new Argument<>();
Platform.dbFetchFields( "TRMTYP", strmtypBox, "NAM", snamBox );
strmtyp = strmtypBox.value;
snam = snamBox.value;
if( Platform.errorCode() <= 0 )
{
act_id.value = strmtyp;
......
......@@ -4,7 +4,9 @@ String getRef(String cliextkey,String objinr,String objtyp)
//DBExecuteSQL( "SELECT REF FROM PTS WHERE PTYINR IN (SELECT INR FROM PTY WHERE EXTKEY ='R0000216
Platform.dbExecuteSql( "SELECT REF FROM PTS WHERE PTYINR IN (SELECT INR FROM PTY WHERE EXTKEY LIKE '" + Platform.mid( cliextkey, 1, 10 ) + "%') AND objtyp='" + objtyp + "' AND OBJINR='" + objinr + "' " );
int err = Platform.errorCode();
Platform.dbFetchFields( "", fileds );
Argument<String> filedsBox = new Argument<>();
Platform.dbFetchFields( "", filedsBox );
fileds = filedsBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
return fileds;
......
......@@ -12,7 +12,19 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( objinr ) && ! Platform.isEmpty( objtyp ) )
{
Platform.dbExecuteSql( "select PYEPTYINR, ORCPTYINR, ORIPTYINR, PAYTYPE, PAYTYP, BCHKEYINR from " + objtyp + " where INR = " + Platform.sqlLit( objinr ) );
Platform.dbFetchFields( "", pyeptyinr, "", orcptyinr, "", oriptyinr, "", vpaytype, "", paytyp, "", bchkeyinr );
Argument<String> pyeptyinrBox = new Argument<>();
Argument<String> orcptyinrBox = new Argument<>();
Argument<String> oriptyinrBox = new Argument<>();
Argument<String> vpaytypeBox = new Argument<>();
Argument<String> paytypBox = new Argument<>();
Argument<String> bchkeyinrBox = new Argument<>();
Platform.dbFetchFields( "", pyeptyinrBox, "", orcptyinrBox, "", oriptyinrBox, "", vpaytypeBox, "", paytypBox, "", bchkeyinrBox );
pyeptyinr = pyeptyinrBox.value;
orcptyinr = orcptyinrBox.value;
oriptyinr = oriptyinrBox.value;
vpaytype = vpaytypeBox.value;
paytyp = paytypBox.value;
bchkeyinr = bchkeyinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -22,7 +34,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( pyeptyinr ) )
{
Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( pyeptyinr ) );
Platform.dbFetchFields( "", pyenam1 );
Argument<String> pyenam1Box = new Argument<>();
Platform.dbFetchFields( "", pyenam1Box );
pyenam1 = pyenam1Box.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -32,7 +46,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( orcptyinr ) )
{
Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( orcptyinr ) );
Platform.dbFetchFields( "", orcnam1 );
Argument<String> orcnam1Box = new Argument<>();
Platform.dbFetchFields( "", orcnam1Box );
orcnam1 = orcnam1Box.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -42,7 +58,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
if( ! Platform.isEmpty( oriptyinr ) )
{
Platform.dbExecuteSql( "select NAM1 from PTY where INR = " + Platform.sqlLit( oriptyinr ) );
Platform.dbFetchFields( "", orinam1 );
Argument<String> orinam1Box = new Argument<>();
Platform.dbFetchFields( "", orinam1Box );
orinam1 = orinam1Box.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -51,7 +69,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
}
String bchkey = "";
Platform.dbExecuteSql( "select bchkey from bch where INR = " + Platform.sqlLit( bchkeyinr ) );
Platform.dbFetchFields( "", bchkey );
Argument<String> bchkeyBox = new Argument<>();
Platform.dbFetchFields( "", bchkeyBox );
bchkey = bchkeyBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -74,7 +94,9 @@ void cptGetTrnInfo(String objtyp,String objinr,Argument<Boolean> checkbch,Argume
Platform.dbExecuteSql( "select upbranch from bch where bchkey='" + $\sysmod\bch\bchkey.getValue() + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", upbranch );
Argument<String> upbranchBox = new Argument<>();
Platform.dbFetchFields( "", upbranchBox );
upbranch = upbranchBox.value;
if( Platform.compareTo( bchkey , upbranch ) == 0 && Platform.errorCode() == 0 )
{
checkbch.value = true;
......
......@@ -5,7 +5,9 @@ void getcpdobjtyp(String objinr,Argument<String> paytyp)
Platform.dbExecuteSql( "select paytyp from cpd where inr='" + objinr + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vpaytyp );
Argument<String> vpaytypBox = new Argument<>();
Platform.dbFetchFields( "", vpaytypBox );
vpaytyp = vpaytypBox.value;
if( Platform.errorCode() <= 0 )
{
paytyp.value = vpaytyp;
......
......@@ -8,7 +8,13 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin
int ignore = 0;
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", acttrmcod, "", trmtyp, "", snam );
Argument<String> acttrmcodBox = new Argument<>();
Argument<String> trmtypBox = new Argument<>();
Argument<String> snamBox = new Argument<>();
Platform.dbFetchFields( "", acttrmcodBox, "", trmtypBox, "", snamBox );
acttrmcod = acttrmcodBox.value;
trmtyp = trmtypBox.value;
snam = snamBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -99,7 +105,9 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin
Platform.dbExecuteSql( "SELECT FXTYP FROM FXD WHERE INR ='" + objinr + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", fxtyp );
Argument<String> fxtypBox = new Argument<>();
Platform.dbFetchFields( "", fxtypBox );
fxtyp = fxtypBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -251,7 +259,9 @@ void printSubpenaType(String objtyp,String objinr,String act,String dbtcdt,Strin
printB( title3, dat, nam1, act, amount, sf, txt1, info3, hxdh, sbnum );
frame = "";
Platform.dbExecuteSQL( "SELECT INIFRM FROM TRN WHERE INR=?", $\trn\inr.getValue() );
Platform.dbFetchFields( "", frame );
Argument<String> frameBox = new Argument<>();
Platform.dbFetchFields( "", frameBox );
frame = frameBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -9,7 +9,9 @@ void printA(String title,String dat,String shm,String act,String amount,String t
if( ! Platform.isEmpty( act ) )
{
Platform.dbExecuteSql( "select nam from act where extkey = " + Platform.sqlLit( act ) );
Platform.dbFetchFields( "", actnam );
Argument<String> actnamBox = new Argument<>();
Platform.dbFetchFields( "", actnamBox );
actnam = actnamBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -23,7 +25,11 @@ void printA(String title,String dat,String shm,String act,String amount,String t
String times = "";
String strname = "";
Platform.dbExecuteSQL( "SELECT times, strname FROM tnn WHERE trninr=?", $\trn\inr.getValue() );
Platform.dbFetchFields( "", times, "", strname );
Argument<String> timesBox = new Argument<>();
Argument<String> strnameBox = new Argument<>();
Platform.dbFetchFields( "", timesBox, "", strnameBox );
times = timesBox.value;
strname = strnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -43,7 +49,11 @@ void printA(String title,String dat,String shm,String act,String amount,String t
String branch = "";
String bchname = "";
Platform.dbExecuteSQL( "SELECT BRANCH, BCHNAME FROM BCH WHERE INR=(SELECT BCHKEYINR FROM TRN WHERE INR=?)", $\trn\inr.getValue() );
Platform.dbFetchFields( "", branch, "", bchname );
Argument<String> branchBox = new Argument<>();
Argument<String> bchnameBox = new Argument<>();
Platform.dbFetchFields( "", branchBox, "", bchnameBox );
branch = branchBox.value;
bchname = bchnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -8,7 +8,12 @@ void printB(String title,String dat,String shm,String act,String amount,String s
String times = "";
String strname = "";
Platform.dbExecuteSQL( "SELECT times, strname FROM tnn WHERE trninr=?", $\trn\inr.getValue() );
Platform.dbFetchFields( "", times, "", strname );
// Platform.dbFetchFields( "", times, "", strname );
Argument<String> timesBox = new Argument<>();
Argument<String> strnameBox = new Argument<>();
Platform.dbFetchFields( "", timesBox, "", strnameBox );
times = timesBox.value;
strname = strnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -64,7 +69,12 @@ void printB(String title,String dat,String shm,String act,String amount,String s
String branch = "";
String bchname = "";
Platform.dbExecuteSQL( "SELECT BRANCH, BCHNAME FROM BCH WHERE INR=(SELECT BCHKEYINR FROM TRN WHERE INR=?)", $\trn\inr.getValue() );
Platform.dbFetchFields( "", branch, "", bchname );
// Platform.dbFetchFields( "", branch, "", bchname );
Argument<String> branchBox = new Argument<>();
Argument<String> bchnameBox = new Argument<>();
Platform.dbFetchFields( "", branchBox, "", bchnameBox );
branch = branchBox.value;
bchname = bchnameBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -4,6 +4,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
int ignore = 0;
String ownref = NULLSTR;
String type = NULLSTR;
Argument<String> rptnoBox = new Argument<>();
Argument<String> ownrefBox = new Argument<>();
switch( objtyp )
{
case "BRD":
......@@ -12,7 +14,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBC WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -21,7 +24,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBF WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -34,7 +38,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBA WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -43,7 +48,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBD WHERE BUSCODE=(SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "')" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -54,7 +60,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT ownref FROM " + objtyp + " WHERE INR ='" + objinr + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", ownref );
Platform.dbFetchFields( "", ownrefBox );
ownref = ownrefBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -64,7 +71,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBA WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -73,7 +81,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBD WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -84,7 +93,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBB WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -93,7 +103,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT rptno FROM DBE WHERE BUSCODE='" + ownref + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", rptno );
Platform.dbFetchFields( "", rptnoBox );
rptno = rptnoBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -103,10 +114,12 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
default:
}
String hx = "";
Argument<String> hxBox = new Argument<>();
Platform.dbExecuteSql( "SELECT refnos FROM dbm WHERE rptno='" + rptno + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", hx );
Platform.dbFetchFields( "", hxBox );
hx = hxBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......@@ -115,7 +128,8 @@ void getSBNUM(String objtyp,String objinr,Argument<String> sbnum,Argument<String
Platform.dbExecuteSql( "SELECT refnos FROM dbr WHERE rptno='" + rptno + "'" );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", hx );
Platform.dbFetchFields( "", hxBox );
hx = hxBox.value;
ignore = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -19,9 +19,15 @@ void svsLoadSavedContent()
String content = "";
String cot = "";
String con = "";
Argument<String> fldBox = new Argument<>();
Argument<String> cotBox = new Argument<>();
Argument<String> conBox = new Argument<>();
while( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "FLD", fld, "COT", cot, "CON", con );
Platform.dbFetchFields( "FLD", fldBox, "COT", cotBox, "CON", conBox );
fld = fldBox.value;
cot = cotBox.value;
con = conBox.value;
if( Platform.errorCode() == 0 )
{
content = Platform.mid( cot, 1, 1 ) + con;
......
......@@ -12,7 +12,9 @@ static String sptStaOfOtherEntryForObj(IModule argmod)
{
Platform.dbExecuteSQL( "Select distinct STA from SPT where DELFLG = ' ' and OBJTYP = ? and OBJINR = ? and INR <> ?", objTyp, objInr, $\sysmod\spt\inr.getValue() );
sptSta = "";
Platform.dbFetchFields( "", sptSta );
Argument<String> sptStaBox = new Argument<>();
Platform.dbFetchFields( "", sptStaBox );
sptSta = sptStaBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound )
{
......
......@@ -52,7 +52,21 @@ static void menuPrint()
{
Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( strsql, trninr1 );
Platform.dbFetchFields( "", inr, "", trninr, "", times, "", strname, "", filename, "", title1, "", status );
Argument<String> inrBox = new Argument<>();
Argument<String> trninrBox = new Argument<>();
Argument<Integer> timesBox = new Argument<>();
Argument<String> strnameBox = new Argument<>();
Argument<String> filenameBox = new Argument<>();
Argument<String> title1Box = new Argument<>();
Argument<String> statusBox = new Argument<>();
Platform.dbFetchFields( "", inrBox, "", trninrBox, "", timesBox, "", strnameBox, "", filenameBox, "", title1Box, "", statusBox );
inr = inrBox.value;
trninr = trninrBox.value;
times = timesBox.value;
strname = strnameBox.value;
filename = filenameBox.value;
title1 = title1Box.value;
status = statusBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.isEmpty( inr ) )
......
......@@ -26,7 +26,11 @@ void allUsrGetStream(IStream argstm)
Platform.dbExecuteSql( sql );
while( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "EXTKEY", extkey, "NAM", nam );
Argument<String> extkeyBox = new Argument<>();
Argument<String> namBox = new Argument<>();
Platform.dbFetchFields( "EXTKEY", extkeyBox, "NAM", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
if( Platform.errorCode() <= 0 )
{
Platform.streamInsert( argstm, 0, extkey + "\t" + nam );
......
......@@ -26,7 +26,12 @@ void allUsgGetStream(IStream argstm)
Platform.dbExecuteSql( sql );
while( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "EXTKEY", extkey, "NAM", nam );
// Platform.dbFetchFields( "EXTKEY", extkey, "NAM", nam );
Argument<String> extkeyBox = new Argument<>();
Argument<String> namBox = new Argument<>();
Platform.dbFetchFields( "EXTKEY", extkeyBox, "NAM", namBox );
extkey = extkeyBox.value;
nam = namBox.value;
if( Platform.errorCode() <= 0 )
{
Platform.streamInsert( argstm, 0, extkey + "\t" + nam );
......
......@@ -85,7 +85,11 @@ void sptQueUpdate(#spt argspt)
{
msgtyp = "";
sndkey = "";
Platform.dbFetchFields( "MSGTYP", msgtyp, "SNDKEY", sndkey );
Argument<String> msgtypBox = new Argument<>();
Argument<String> sndkeyBox = new Argument<>();
Platform.dbFetchFields( "MSGTYP", msgtypBox, "SNDKEY", sndkeyBox );
msgtyp = msgtypBox.value;
sndkey = sndkeyBox.value;
if( Platform.errorCode() <= 0 )
{
$que\addref = "MT " + msgtyp;
......
......@@ -53,7 +53,9 @@ void getptyfields(String rol,String ptyfileds,Argument<String> ptyval)
if( Platform.errorCode() <= 0 )
{
vptyfileds = "";
Platform.dbFetchFields( "", vptyfileds );
Argument<String> vptyfiledsBox = new Argument<>();
Platform.dbFetchFields( "", vptyfiledsBox );
vptyfileds = vptyfiledsBox.value;
if( Platform.errorCode() <= 0 )
{
ptyval.value = vptyfileds;
......
......@@ -70,12 +70,15 @@ void getbranch()
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 )
{
streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\branch.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch );
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
}
Platform.dbCloseCursor();
}
......
......@@ -78,12 +78,15 @@ void getbchkey_cp()
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 )
{
streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\bchkey.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch );
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
}
Platform.dbCloseCursor();
}
......
......@@ -71,12 +71,15 @@ void getbranch_cp()
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 )
{
streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\branch.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch );
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
}
Platform.dbCloseCursor();
}
......
......@@ -81,12 +81,15 @@ void getbchkey()
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 )
{
streamcount = streamcount + 1;
Platform.streamInsert( $frmstk\bchkey.getValue(), streamcount, branch );
Platform.dbFetchFields( "", branch );
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
}
Platform.dbCloseCursor();
}
......
......@@ -37,14 +37,17 @@ static String upBCHKEYsqlofbch(String bchnam)
Platform.dbCloseCursor();
}
branch = "";
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
while( Platform.errorCode() == 0 )
{
if( Platform.streamSearch( bRANCHinr, branch ) <= 0 )
{
Platform.streamInsert( bRANCHinr, 0, branch );
}
Platform.dbFetchFields( "", branch );
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
}
Platform.dbCloseCursor();
}
......
......@@ -244,6 +244,8 @@ void getReferance(Argument<String> ref)
int lengidref = 0;
int nCou = 0;
int cou = 0;
Argument<Integer> nCouBox = new Argument<>();
Argument<Integer> couBox = new Argument<>();
if( Platform.compareTo( sTrname , #CT000517 ) == 0 || Platform.compareTo( sTrname , #CT000518 ) == 0 )
{
sIsExist = refIsExist( "GC", "\\GIDGRP\\REC\\INR" );
......@@ -259,7 +261,8 @@ void getReferance(Argument<String> ref)
}
Platform.dbExecuteSql( "SELECT COUNT(*) FROM GCD WHERE OWNREF LIKE '" + sTrnref + "__'" );
nCou = 0;
Platform.dbFetchFields( "", nCou );
Platform.dbFetchFields( "", nCouBox );
nCou = nCouBox.value;
if( Platform.errorCode() == 0 )
{
}
......@@ -269,7 +272,8 @@ void getReferance(Argument<String> ref)
//因此此处count取业务表与spt表的和
Platform.dbExecuteSql( "SELECT COUNT(*) FROM SPT WHERE STA = 'PEN' AND OWNREF LIKE '" + sTrnref + "__'" );
cou = 0;
Platform.dbFetchFields( "", cou );
Platform.dbFetchFields( "", couBox );
cou = couBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
//--------------end--------------------------------
......@@ -295,7 +299,8 @@ void getReferance(Argument<String> ref)
}
Platform.dbExecuteSql( "SELECT COUNT(*) FROM BRD WHERE OWNREF LIKE '" + sTrnref + "__'" );
nCou = 0;
Platform.dbFetchFields( "", nCou );
Platform.dbFetchFields( "", nCouBox );
nCou = nCouBox.value;
if( Platform.errorCode() == 0 )
{
}
......@@ -305,7 +310,8 @@ void getReferance(Argument<String> ref)
//因此此处count取业务表与spt表的和
Platform.dbExecuteSql( "SELECT COUNT(*) FROM SPT WHERE STA = 'PEN' AND OWNREF LIKE '" + sTrnref + "__'" );
cou = 0;
Platform.dbFetchFields( "", cou );
Platform.dbFetchFields( "", couBox );
cou = couBox.value;
err = Platform.errorCode();
nCou = nCou + cou;
Platform.dbCloseCursor();
......
......@@ -36,7 +36,9 @@ void getptyfields1(String rol,String ptyfileds,Argument<String> ptyval)
if( Platform.errorCode() <= 0 )
{
vptyfileds = "";
Platform.dbFetchFields( "", vptyfileds );
Argument<String> vptyfiledsBox = new Argument<>();
Platform.dbFetchFields( "", vptyfiledsBox );
vptyfileds = vptyfiledsBox.value;
if( Platform.errorCode() <= 0 )
{
ptyval.value = vptyfileds;
......
......@@ -5,7 +5,9 @@ static String getAccbch()
if( ! Platform.isEmpty( $\sysmod\wrkbch\bchkey ) )
{
Platform.dbExecuteSql( "SELECT ACCBCH FROM BCH WHERE BRANCH = '" + $\sysmod\wrkbch\bchkey.getValue() + "'" );
Platform.dbFetchFields( "", accbch );
Argument<String> accbchBox = new Argument<>();
Platform.dbFetchFields( "", accbchBox );
accbch = accbchBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound )
{
......
......@@ -16,7 +16,9 @@ static boolean checkFinStatus(String objtyp,String objinr)
relFlg = "";
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", relFlg );
Argument<String> relFlgBox = new Argument<>();
Platform.dbFetchFields( "", relFlgBox );
relFlg = relFlgBox.value;
}
}
int ignore = Platform.errorCode();
......
......@@ -24,7 +24,9 @@ String getRef(String strntbl,int nlen)
//收单行模式取单证中心为代表机构
sql = "select bchflg from bch where branch='" + Platform.trim( $\sysmod\bch\upbchkey.getValue() ) + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "bchflg", dbjgtxt );
Argument<String> dbjgtxtBox = new Argument<>();
Platform.dbFetchFields( "bchflg", dbjgtxtBox );
dbjgtxt = dbjgtxtBox.value;
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -60,7 +60,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value, "", zhxz.value, "", yefx.value );
Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye, "", zhxz, "", yefx );
err = Platform.errorCode();
}
Platform.sqlSetCommittedRead();
......@@ -80,7 +80,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value );
Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye );
err = Platform.errorCode();
yefx.value = "1";
}
......@@ -101,7 +101,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value, "", zhxz.value );
Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye, "", zhxz );
err = Platform.errorCode();
yefx.value = "1";
}
......@@ -122,7 +122,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value );
Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye );
err = Platform.errorCode();
yefx.value = "0";
}
......@@ -143,7 +143,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khdh.value, "", khmc.value, "", zhye.value, "", yefx.value );
Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khdh, "", khmc, "", zhye, "", yefx );
err = Platform.errorCode();
}
Platform.sqlSetCommittedRead();
......@@ -163,7 +163,7 @@ static boolean getBalance(Argument<String> act,Argument<String> dqdh,Argument<St
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", vact, "", dqdh.value, "", jgdh.value, "", hbzl.value, "", kmdh.value, "", khmc.value, "", zhye.value );
Platform.dbFetchFields( "", vact, "", dqdh, "", jgdh, "", hbzl, "", kmdh, "", khmc, "", zhye );
err = Platform.errorCode();
if( zhye.value >= 0 )
{
......
......@@ -17,14 +17,18 @@ String runTrngetData(String srvnam,String calltp,String trninr,String itfinr,Str
branchinr = "";
branch = "";
Platform.dbExecuteSql( "select distinct branchinr from gle where objINR ='" + $acg\objinr.getValue() + "' and objtyp='" + $acg\objtyp.getValue() + "' and trninr ='" + $acg\trninr.getValue() + "'" );
Platform.dbFetchFields( "", branchinr );
Argument<String> branchinrBox = new Argument<>();
Platform.dbFetchFields( "", branchinrBox );
branchinr = branchinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
}
Platform.dbCloseCursor();
Platform.dbExecuteSql( "select distinct branch from bch where INR ='" + branchinr + "'" );
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -27,7 +27,9 @@ static boolean isRegistrationMode(String frm)
sql = "select stb.txt from atp,stb where atp.cod='" + frm + "' and stb.tbl='TRNLEV' and stb.uil='EN' and stb.cod=atp.trnlev ";
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", runflg );
Argument<String> runflgBox = new Argument<>();
Platform.dbFetchFields( "", runflgBox );
runflg = runflgBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() != tdOdbcNotFound )
{
......
......@@ -9,7 +9,9 @@ String getBchcode(String argbranch)
String outfields = "";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "Select branch from BCH where INR = ?", argbranch );
Platform.dbFetchFields( "", outfields );
Argument<String> outfieldsBox = new Argument<>();
Platform.dbFetchFields( "", outfieldsBox );
outfields = outfieldsBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound )
{
......
......@@ -5,7 +5,9 @@ static String getBchPtyinr(String upbchkey)
int error = 0;
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", ptyinr );
Argument<String> ptyinrBox = new Argument<>();
Platform.dbFetchFields( "", ptyinrBox );
ptyinr = ptyinrBox.value;
error = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -7,7 +7,9 @@ static String getBchinr(String bchkey)
Platform.dbExecuteSql( "select inr from bch where branch='" + bchkey + "' " );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", bchinr );
Argument<String> bchinrBox = new Argument<>();
Platform.dbFetchFields( "", bchinrBox );
bchinr = bchinrBox.value;
error = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -16,7 +16,9 @@ void getPtyGS(String ptyinr,Argument<String> idtype)
Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", typ );
Argument<String> typBox = new Argument<>();
Platform.dbFetchFields( "", typBox );
typ = typBox.value;
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -15,7 +15,9 @@ void getPtyAccMng(String ptyinr,String argptspta,String rol,String fileds,Argume
Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", returnVar );
Argument<String> returnVarBox = new Argument<>();
Platform.dbFetchFields( "", returnVarBox );
returnVar = returnVarBox.value;
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -70,7 +70,9 @@ static void getACTInformation()
{
branch = "";
Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() );
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
//$Ret = \SYSMOD.CallInterface( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt )
......
......@@ -56,7 +56,13 @@ static void getHzBank(IStream branch)
{
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname );
Argument<String> inrBox = new Argument<>();
Argument<String> vbranchBox = new Argument<>();
Argument<String> bCHnameBox = new Argument<>();
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
while( Platform.errorCode() == 0 )
{
if( Platform.isEmpty( values ) )
......@@ -68,7 +74,10 @@ static void getHzBank(IStream branch)
values = values + "\r\n" + inr;
}
Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname );
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
}
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -7,7 +7,9 @@ static String getActBchinr(String bchkey)
Platform.dbExecuteSql( "select inr from bch where branch in (select accbch from bch where branch='" + bchkey + "' )" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", accbchinr );
Argument<String> accbchinrBox = new Argument<>();
Platform.dbFetchFields( "", accbchinrBox );
accbchinr = accbchinrBox.value;
error = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -6,7 +6,9 @@ static int getXRTFEILDRAT(String cur,String forratnam)
String endDatSql = " ENDDAT > " + Platform.sqlDate( Platform.today() );
String sqlWhere = sqlrat + " AND " + begDatSql + " AND " + endDatSql;
Platform.dbExecuteSql( sqlWhere );
Platform.dbFetchFields( "", forrat );
Argument<Integer> forratBox = new Argument<>();
Platform.dbFetchFields( "", forratBox );
forrat = forratBox.value;
int err = Platform.errorCode();
Platform.dbCloseCursor();
return forrat;
......
......@@ -395,7 +395,9 @@ void getXDInfo()
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
// PromptOK( 'RG000966
Platform.dbFetchFields( "", ownref1 );
Argument<String> ownref1Box = new Argument<>();
Platform.dbFetchFields( "", ownref1Box );
ownref1 = ownref1Box.value;
error = Platform.errorCode();
// PromptOK( 'RG000967
Platform.dbCloseCursor();
......
......@@ -24,7 +24,7 @@ void getTrnUSG(Argument<String> grp)
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( rousql );
err = Platform.errorCode();
Platform.dbFetchFields( "", grp.value );
Platform.dbFetchFields( "", grp );
Platform.dbCloseCursor();
err = Platform.errorCode();
Platform.sqlSetCommittedRead();
......
......@@ -9,7 +9,9 @@ String getBchnam(String argbranch)
String outfields = "";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "Select bchname from BCH where INR = ?", argbranch );
Platform.dbFetchFields( "", outfields );
Argument<String> outfieldsBox = new Argument<>();
Platform.dbFetchFields( "", outfieldsBox );
outfields = outfieldsBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound )
{
......
......@@ -7,7 +7,7 @@ static void getUSRname(String usrkey,Argument<String> usrname)
{
Platform.sqlSetDirtyRead();
Platform.dbExecuteSQL( "Select NAM from USR where EXTKEY = ?", usrkey );
Platform.dbFetchFields( "", usrname.value );
Platform.dbFetchFields( "", usrname );
Platform.dbCloseCursor();
err = Platform.errorCode();
Platform.sqlSetCommittedRead();
......
......@@ -62,7 +62,13 @@ static void getHzBankKEY(IStream branch)
{
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname );
Argument<String> inrBox = new Argument<>();
Argument<String> vbranchBox = new Argument<>();
Argument<String> bCHnameBox = new Argument<>();
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
while( Platform.errorCode() == 0 )
{
if( Platform.isEmpty( values ) )
......@@ -74,7 +80,10 @@ static void getHzBankKEY(IStream branch)
values = values + "\r\n" + inr;
}
Platform.streamInsert( b, 0, inr + "\t" + vbranch + " " + bCHname );
Platform.dbFetchFields( "INR", inr, "BRANCH", vbranch, "BCHNAME", bCHname );
Platform.dbFetchFields( "INR", inrBox, "BRANCH", vbranchBox, "BCHNAME", bCHnameBox );
inr = inrBox.value;
vbranch = vbranchBox.value;
bCHname = bCHnameBox.value;
}
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -14,7 +14,8 @@ String getBchFields(String argfld,String whrsql)
sql = "SELECT " + argfld + " FROM BCH " + whrsql;
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", fldval );
Platform.dbFetchFields( "", fldvalBox );
fldval=fldvalBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( ! Platform.isEmpty( fldval ) )
......
......@@ -60,7 +60,9 @@ static void getACTInformationNew()
{
branch = "";
Platform.dbExecuteSQL( "select branch from bch where inr = ?", $\sysmod\ucl\branchinr.getValue() );
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<>();
Platform.dbFetchFields( "", branchBox );
branch = branchBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
//$Ret = \SYSMOD.CallInterface( "INFACT", $Act + ";" + $branch + ";" + \SYSMOD\USR\EXTKEY, "", $errtxt )
......
......@@ -25,7 +25,9 @@ String getLttRef(String strntbl,int nlen,String lttref,String lttinr,String benf
//收单行模式取单证中心为代表机构
sql = "select bchflg from bch where branch='" + Platform.trim( $\sysmod\bch\upbchkey.getValue() ) + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "bchflg", dbjgtxt );
Argument<String> dbjgtxtBox = new Argument<>();
Platform.dbFetchFields( "bchflg", dbjgtxtBox );
dbjgtxt = dbjgtxtBox.value;
if( Platform.errorCode() <= 0 )
{
}
......@@ -51,7 +53,9 @@ String getLttRef(String strntbl,int nlen,String lttref,String lttinr,String benf
num = "";
sql = "select max(ownref) from btd where btdflg='2' and pnttyp='LTD' and pntinr='" + lttinr + "' ";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", num );
Argument<String> numBox = new Argument<>();
Platform.dbFetchFields( "", numBox );
num = numBox.value;
if( Platform.isEmpty( num ) )
{
num = "001";
......
......@@ -9,7 +9,7 @@ void getTrnUsr(String frm,String ownref,Argument<String> iniusr)
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( rousql );
err = Platform.errorCode();
Platform.dbFetchFields( "", iniusr.value );
Platform.dbFetchFields( "", iniusr );
Platform.dbCloseCursor();
err = Platform.errorCode();
Platform.sqlSetCommittedRead();
......
......@@ -7,7 +7,9 @@ static String getPtyinr(String ptybic)
Platform.dbExecuteSql( "select inr from pty where extkey='" + ptybic + "' " );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", ptyinr );
Argument<String> ptyinrBox = new Argument<>();
Platform.dbFetchFields( "", ptyinrBox );
ptyinr = ptyinrBox.value;
error = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -9,7 +9,9 @@ default $name order 1000
Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", txt );
Argument<String> txtBox = new Argument<>();
Platform.dbFetchFields( "", txtBox );
txt = txtBox.value;
err = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -7,7 +7,9 @@ static String getActCur(String extkey)
Platform.dbExecuteSql( "select cur from act where extkey = '" + extkey + "'" );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", acccur );
Argument<String> acccurBox = new Argument<>();
Platform.dbFetchFields( "", acccurBox );
acccur = acccurBox.value;
error = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -7,7 +7,9 @@ static String selectSmhMsgtyp(String texts)
{
sqlSmh = "SELECT MSGTYP FROM SMH WHERE OBJTYP ='CPD' AND TRNTYP = 'TRN' AND TRNINR <> ' ' AND F21 <> ' ' AND MSGTYP = 'T23' AND OBJINR = " + Platform.sqlLit( texts );
Platform.dbExecuteSql( sqlSmh );
Platform.dbFetchFields( "", msgtyp );
Argument<String> msgtypBox = new Argument<>();
Platform.dbFetchFields( "", msgtypBox );
msgtyp = msgtypBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
}
......
......@@ -43,7 +43,9 @@ init $$\ order 9000570
sql = "SELECT BCHINR FROM AUR WHERE INR ='" + aurinr + "'";
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", aurBranch );
Argument<String> aurBranchBox = new Argument<>();
Platform.dbFetchFields( "", aurBranchBox );
aurBranch = aurBranchBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
Platform.dbRead( $bch, aurBranch, "INR" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment