-
Toan Nguyen
- PowerBuilder
- Monday, 24 August 2026 04:11 AM UTC
Hello All,
I have PB applications written in PB2022R3 3397. The applications use native driver to connect to Oracle database and work great.
To support MFA authentication requirement, we have to switch to ADO.NET driver to connect to Oracle database.
I am getting errors using CURSOR in ADO.NET. I am attaching the error screen shot here.
+++++++
Sample script:
DECLARE alias_curs CURSOR FOR
SELECT alias_surname,
alias_given_name
FROM ink_alias
WHERE ink_id = :as_ink_id;
OPEN alias_curs;
if sqlca.sqlcode = 0 then
do while SQLCA.SQLCode = 0
FETCH alias_curs INTO :ls_sname, :ls_gname;
if sqlca.sqlcode = 0 then
li_an_offset = LenA(ls_sname) + 2
ls_aliases = ls_aliases + "/A" + String(li_an_offset, "00") + ls_sname + " " + ls_gname
elseif sqlca.sqlcode <> 100 then
f_db_Message( 'Message Prep Failed', 'Unable to retrieve alias information for INK ID: ' + as_ink_id, sqlca)
return ''
end if
loop
CLOSE alias_curs;
else
f_db_Message( 'Message Prep Failed', 'Unable to retrieve alias information for INK ID: ' + as_ink_id, sqlca)
return ''
end if
RETURN ls_aliases
+++++++
The above codes work for native Oracle connection but not for ADO.NET.
Receives "ORA-01008: not all variables bound" error.
I would greatly appreciate if someone here have run into this issue and share a solution for it.
Thank you very much in advance.
Toan Nguyen
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.