JDEDB_COMMIT_MANUAL resultset limitation?

BOster

BOster

Legendary Poster
I am researching on Oracle support, but I thought I would ask this here since someone might know the answer and save me some time.

We rarely use JDEDB_COMMIT_MANUAL option in C BSFNs when doing any type of transaction processing but instead let the caller (APPL, UBE, etc.) determine if TP is enabled and set boundaries, etc. - the way it appears Oracle kind of wants you to do it. However we do occasionally handle TP within a BSFN and we haven't really had any problems, until just recently.

We have an issue in some code that has been in place for years - not sure if the issue was always there or if it is new. We are reading through a result set on one table handle (hRequestRead) and updating the same table using a different table handle (hRequestUpdate). Both table handles are opened on the same HUSER handle intialized with:

<font class="small">Code:</font><hr /><pre>
JDB_InitUser(lpBhvrCom->hEnv, &hUser, (JCHAR *) NULL, JDEDB_COMMIT_MANUAL)
</pre><hr />

We found that the result set on the table doing the reading was only returning the first 100 rows when it should have been returning 600+ rows. If I change the code to open the hRequestRead table using a seperate HUSER handle initialized with

<font class="small">Code:</font><hr /><pre>
JDB_InitBhvr(lpBhvrCom, &hUserAuto, (JCHAR *) NULL, JDEDB_COMMIT_AUTO)
</pre><hr />

hRequestRead returns all the rows that it should in its result set.

Any ideas?
 
Pretty strange behaviour Brian. This probably has no impact, but it looks like you are using two different APIs to setup the user handle (JDB_InitUser vs. JDB_InitBhvr). I would expect the two to work the same, but might be worth a shot.

Craig
 
When you use JDEDB_COMMIT_MANUAL, I have found you have to use:

<font class="small">Code:</font><hr /><pre>
JDB_InitUser(lpBhvrCom->hEnv, &hUser, (JCHAR *) NULL, JDEDB_COMMIT_MANUAL);

JDB_FreeUser(hUser);
</pre><hr />

instead of

<font class="small">Code:</font><hr /><pre>
JDB_InitBhvr
JDB_FreeBhvr
</pre><hr />

I never fully understood why but I think that may actually be documented some place. I opened a case with Oracle because I can't find anything that would explain the behavior I am seeing. This code was put in to place in 2010, I am not sure if this has allways been an issue and we never discovered it before. The particular process where we discovered this problem could actually hide this problem - the way the process works it will eventually kind of self correct. My bigger fear is all the other places where we use JDEDB_COMMIT_MANUAL and we do both reads and writes using an HUSER handle initialized with the JDEDB_COMMIT_MANUAL option.
 
Back
Top