|
I'm having a small issue with using jdbc_next.
I have a program that executes 1 of 3 different sql statements.
I think all 3 are executing, but 1 of the 3 does not retrieve anything
using jdbc_next
The pertinent parts of the code are shown below.
Only when a single user is selected does it fail. If I check the value
of RS after the JDBC_EXECPREPQRY(STMT) it has a value something like
870760860.
However, it immediately exits the dow loop below it. Maybe I'm
mistaken, but I thought that by RS having a value, it meant that it
executed the sql successfully
Does anyone see anything obvious with this?
Thanks
Mike
// if supervisor selected
if super> *blanks ;
stmt = JDBC_PrepStmt(connms: 'select * from +
udf join names on udf.nameid = names.id +
where udfnum = 2 and udftext = ?') ;
JDBC_SetString(stmt:1: super );
rs = JDBC_ExecPrepQry(stmt);
else ;
// if single user selected
if last> *blanks ;
stmt = JDBC_PrepStmt(connms: 'select * from +
udf join names on udf.nameid = names.id +
where udfnum = 2 and lname = ? and fname = ?') ;
JDBC_SetString(stmt:1: first );
JDBC_SetString(stmt:2: last );
rs = JDBC_ExecPrepQry(stmt);
else ;
//Select all Users
stmt = JDBC_PrepStmt(connms: 'select * from +
udf join names on udf.nameid = names.id +
where udfnum = 2 ') ;
rs = JDBC_ExecPrepQry(stmt);
endIf ;
endIf ;
x = 0;
dow (JDBC_nextRow(rs)<> *OFF);
x=x+1 ;
A_LNAME(x) = (jdbc_getCol(rs: 8));
A_FNAME(x) = (jdbc_getCol(rs: 9));
EndDo ;
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.