Karzmo
Active Member
Hi All,
My C++ skills are pretty limited but I have discovered an issue in a BSFN where on SelectKeyed the return value of idJDBReturn ALWAYS = JDEDB_PASSED (ie '1') even if there are no matching records. I don't really understand why (and clearly I don't understand what SelectKeyed does or returns) - can someone explain please I have checked the indexes on the table and even regenerated them. I have checked the log's as well and the select statement seems valid.
If there are no valid records I need the BSFN to finish otherwise it hangs further down (due to null pointers).
I have replicated the code here:
dsF55018Key.tm55ahtmqn = lpDS->n55TMQueryNumber;
jdeStrcpy(dsF55018Key.tm55ahstso, (const JCHAR *) (_J("A")));
idJDBReturn = JDB_SelectKeyed(dsOpenTables.hRequestF55018, ID_F55018_STATUS__QUERYNO__QUERYLINENO,
(void *)(&dsF55018Key), (short) 2);
if (idJDBReturn != JDEDB_PASSED)
{
jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, _J("550053"), (LPVOID) NULL);
return ER_ERROR;
}
Thanks!
My C++ skills are pretty limited but I have discovered an issue in a BSFN where on SelectKeyed the return value of idJDBReturn ALWAYS = JDEDB_PASSED (ie '1') even if there are no matching records. I don't really understand why (and clearly I don't understand what SelectKeyed does or returns) - can someone explain please I have checked the indexes on the table and even regenerated them. I have checked the log's as well and the select statement seems valid.
If there are no valid records I need the BSFN to finish otherwise it hangs further down (due to null pointers).
I have replicated the code here:
dsF55018Key.tm55ahtmqn = lpDS->n55TMQueryNumber;
jdeStrcpy(dsF55018Key.tm55ahstso, (const JCHAR *) (_J("A")));
idJDBReturn = JDB_SelectKeyed(dsOpenTables.hRequestF55018, ID_F55018_STATUS__QUERYNO__QUERYLINENO,
(void *)(&dsF55018Key), (short) 2);
if (idJDBReturn != JDEDB_PASSED)
{
jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, _J("550053"), (LPVOID) NULL);
return ER_ERROR;
}
Thanks!