refresh not working with 1 record in dataset

syi129

Member²
Hi

I am using DOA 4.0.7.1 with oracle 10g. I have come accross a very strange error. I have a dataset that has commit on post as false. I then call post.

I can see from oracle monitor that the insert statement is correct and a new rowid is returned. However if I call refresh record to get the sequence number of the record, the rowid passed to the select statement is not correct. This is a very stange error as it works if there are no records in the dataset or if there are more than one reord in the dataset.

Has anyone got a work around for this?

 
well what I could see was that the FCurRec had a value of 0 rather than a value of 1 in the unit OracleData. However this only occured prior to the commit of the 2 record record.

However when you were had inserted the 3rd record FCurRec had a value of 2 which was correct. I will try and go a bit deeper into the code to see why and see if I can find the exact cause. I was just wondering if this had been raised by anyone else
 
I gave up looking into this issue of the RefreshRecord method not working 100% of the time, I found that if I had refreshBeforeEdit switched on and I did and edit and then cancel. That refreshed the records correctly so that work around was good enough for me to to investigate it further
 
Back
Top