General information
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only