Information générale
Titre:
Do not UDF in SQLEXEC
Hi All!
I have problem for used Stored Function in SELECT expression.
In package BIGREPORT ( Oracle Server) function Get_Out_Amount_Date.
function Get_Out_Amount_Date
(
cId in varchar2,
dDateReport in date,
nBranchSys in number
)
return number
is
nAmount number;
cError varchar2(255);
nTmpVal number;
dTmpDate date;
begin
....
.....
mAmount := .....;
return (nAmount);
end Get_Out_Amount_Date;
I have follow code text VFP:
....
ldDateReport = date()
*
lcSelect = "select a.cont_num, a.depo_sum, b.run_term,a.start_con, ";
+"Bigreport.Get_Out_Amount_Date ( a.acc_id, ?ldDateReport, a.Branch_sys ) Amount ";
+"from aaa a, bbb b ";
+"where ";
+"a.prod_sys = b.sys and ";
+"a.prod_sys <> 21 and a.prod_sys <> 1 and ";
+"?ldDateReport <= a.fin_con and ";
+"?ldDateReport >= a.start_con";
*
= MessageBox(lcSelect,0,"") && Test Select string
*
lnResult = sqlexec(oApp.ConnectionHandle,lcSelect,"nppvpl")
lnResult any time -1 !
What's wrong ?
There are other way ?
Thank you,
Yuri
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement