Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 07 SEP 2004 04:15:31AM William Ng wrote:

I have an active list, that is being loop to do some processing to determine if the record to delete or not. It was working fine.

Once i added control on to the table, the active list will be gone after the first loop.Why is this?


At 07 SEP 2004 09:53AM Donald Bakke wrote:

William,

I'm having a hard time understanding what your are doing. What do you mean by "added control to the table"?

[email protected]

SRP Computer Solutions, Inc.


At 07 SEP 2004 10:19AM [email protected] wrote:

William,

are you talking about Control_On and Control_Off routines? For 'transaction control'

[email protected]

DSigs Radio Free Oregon

Phone: 971-570-2005


At 07 SEP 2004 11:13AM [email protected] wrote:

William

Aberrant results when working with transaction control are not completely surprising. This is a very under-utilised part of the product.

A work around might be to place the active select list into a variable before using and pull the ids off this list.

[email protected]

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 07 SEP 2004 11:34PM William Ng wrote:

Yes. Everything was working fine until i added transaction control into my routine.I wanted to enhance the routine so that if any error i can rollback.If everything is ok, then i commit all.


At 07 SEP 2004 11:46PM William Ng wrote:

Sorry for my english.

I have a routine that does an rlist where the result is set as the active list.Then i loop with readnext and for each key i do some processing to determine if i want to delete this record or not.It works fine until i wanted to enhance it with transaction control.I wanted to commit everything or rollback.So in order to add transaction control, i have to add control_on to my table and begin the transaction, if error rollback or everyting ok then commit.The problem is that after adding the transaction control, my active list will go missing after the first loop.My second readnext will fail and thus get out of my loop.This means if i selected 10 records only 1 will be process.This did not happen without the transaction control.I wanted to know why this happen? Have anybody faces this before?


At 08 SEP 2004 12:02AM William Ng wrote:

Thanks for understanding.

Thanks for the alternative.I actually have been trying a lot of things and the closest i came was that i can save the active list and make it active again with activate_save_select but everytime i activate it again, it will always go to the first item or record.If i can continue where i left off then i think i should be able to get it working.Unfortunately even by changing the value of @rn_counter, i could not get it to continue with where if left off.The value in @rn_counter is a bit confusing.It gave me 67 for the first record.Do u have any documentation on this?


At 08 SEP 2004 08:15AM [email protected] wrote:

@Rn.Counter is not positional (see http://www.sprezzatura.com/revmedia/v2i5a20.htm).

[email protected]

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 08 SEP 2004 01:58PM [email protected] wrote:

As sprezz suggested make the list into a variable and loop through that variable list.

A little more roundabout .. you could, once you have a list of keys, use make.list to put it to a cursor other than 0. Then your readnext should work.

[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"

DSig's Radio Free Oregon

David Tod Sigafoos ~ SigSolutions


At 08 SEP 2004 02:17PM [email protected] wrote:

Or (crediting Dave for the idea) use REDUCE and SELECT BY to put it into a different cursor in the first place!

[email protected]

The Sprezzatura Group Web Site

World Leaders in all things RevSoft

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/6447167a2e0dec4b85256f08002d5de4.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1