Dennis:

I know that the List has been very slow the last week but I believe that you will find a solution to your problem. I originally developed the concept of PREVROW, NEXTROW a while back for 6.5++; with the introduction of PROPERTY TABLE your-table ‘REFRESH’ I have not had the need to use the previous method since.

I have a Work Order Main table that has a one-to-many relationship with a Procedure table; in turn, the Procedure table ahs a one-to-many relationships with the Labor and Parts tables. I have no problem keeping the table ‘refreshed’

>>>

DELETE ROWS FROM tableA WHERE tk_nbr = .tknbr
PROPERTY TABLE tableA "REFRESH"
DELETE ROWS FROM tableB WHERE tk_nbr = .tknbr
PROPERTY TABLE tableB "REFRESH"
<<<

I noticed that you use the code above to delete the row from a table and I assume that tableA is the main table and tableB is the sub-table and that they have a one-to-many relationship. If this is the case, I see a problem:

You should always delete the rows from the sub-table (many) first, and then the rows from the main table.

If you are doing the procedure above and it is letting you that, then you probably do not have your PK and FK defined other wise it would not let you delete the rows from the main table (one) first as long as there are row on the sub-table (many) and this is why you might not be displaying the data correctly.

I know that some user like to add the data to a temporary table and the transfer it to the actual table. I prefer to use the actual table; however, I always use speed button to add and delete rows using code rather than the insert, delete roe native functions. For example to enter a new row in a sub-table, I prompt the user for some minimum data, add some default values, insert the data into the table and then use the PROPERTY ….’REFRESH’ to update the form; it work beautifully. New records to them main table are always added with code outside of the form and the then the form is opened in the EDIT mode; as I said, I do not use form in the ENTER mode at all…juts a personal preference that has serve me well.

Maybe you can see if you can duplicate your problem using the Concomp database and post the code, so we might be able to better see what you are trying to accomplish.

Javier,

 

Javier Valencia, PE

President

Valencia Technology Group, L.L.C.

14315 S. Twilight Ln, Suite #14

Olathe, Kansas 66062-4578

Office (913)829-0888

Fax (913)649-2904

Cell (913)915-3137

================================================

Attention:

The information contained in this message and or attachments is intended

only for the person or entity to which it is addressed and may contain

confidential and/or privileged material.  Any review, retransmission,

dissemination or other use of, or taking of any action in reliance upon,

this information by persons or entities other than the intended recipient

is prohibited. If you received this in error, please contact the sender and

delete the material from all system and destroy all copies.

======================================================

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Dennis Fleming
Sent: Monday, September 26, 2005 9:00 AM
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: Refreshing multi table screens

 

Thanks again Dawn.

A workaround is certainly as good as a fix for all my lose ends.

I had that code in one of my iterations. BUT, I had some additional code which did stuff in another table based on the value of the cursor of the row just deleted. Oops.

As Javier pointed out recently, this list can save hours of debugging time without bothering RBTI. The chance that someone else has encountered a similar problem are very likely since we are all going down the same road, same product, same version. I had just explained to my user that "the rows are there, you just don't see them". And they made some comment about that not being very good. And now it works as it should and I can move on. Yippie!

Dennis
*****


At 08:59 AM 9/26/2005, you wrote:

Dennis,
 
Maybe you could do up a sample in Concomp and send it to RDCC?  I'm not sure it's a bug, though.  The cursor in the slave table isn't "advancing".  The REFRESH, just re-fetches the data from the table, it's not doing anything with the cursor.  (That's why you get the cursor error when you try to move in the table after you delete, without refreshing first.)  The work around is to
 
1. Delete your rows
2. Refresh your tables
3. NEXTROW
4. PREVROW
 
OR, if the user is always removing the first record in the record set, instead of NEXTROW,PREVROW, you can do :
 
PROPERTY TABLE toptablename 'FIRST'
 
Which will take the user to the NEW first record in the recordset (after you refreshed it).
 
Dawn


From: Dennis Fleming [mailto:[EMAIL PROTECTED] ]
Sent: Friday, September 23, 2005 9:24 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: Refreshing multi table screens

Thanks Dawn.

The top table displays one row (a work order) and the bottom region displays multiple rows (one or more employees).

I tried Nextrow in the EEP and then I delete the rows in the two tables in the previous row. I thought if I was no longer "looking at" the rows being deleted that the Refresh might work. (If you don't Refresh, you get the invalid cursor error.) I'll play with it a bit more.

Thanks Again,

Dennis
*****


At 04:21 PM 9/23/2005, you wrote:

Dennis,
Are you displaying your rows in regions or a single rows on a form?
Dawn


From: Dennis Fleming [mailto:[EMAIL PROTECTED] ]
Sent: Friday, September 23, 2005 3:22 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: Refreshing multi table screens

Thanks Dawn,

I think I'm closer. Maybe a little more trial and error.
Current code in EEP button is:
...
INSERT INTO oldtableA SELECT ALL FROM tableA WHERE tk_nbr = .tknbr
INSERT INTO oldtableB SELECT ALL FROM tableB WHERE tk_nbr = .tknbr
...
DELETE ROWS FROM tableA WHERE tk_nbr = .tknbr
PROPERTY TABLE tableA "REFRESH"
DELETE ROWS FROM tableB WHERE tk_nbr = .tknbr
PROPERTY TABLE tableB "REFRESH"

The Property Edit you mentioned doesn't seem to make a difference other than asking if I want to save the row(s). The action I am look for is the same is if you Deleted a row in tableA (which is set to delete the corresponding rows in tableB) and then go to the next row in tableA.

Dennis
****

At 01:01 PM 9/23/2005, you wrote:

Dennis,
I have a form that is refreshing multiple tables, using the property
command and it works without nextrow/prevrow.  Though before the
"editing" of the data in the slave table, I had to use the
property...edit command first.  (I do remember initially, I did the
nextrow/prevrow thing which also worked, but caused the screen to
flicker.)

Example:

PROPERTY TABLE slavetablename 'EDIT'
-do other stuff here, like inserting, updating, deleting

PROPERTY TABLE slavetablename 'REFRESH'

I'm not sure if that's what you're doing already.  You don't say how
you're trying to refresh the tables.

Dawn


-----Original Message-----
From: Dennis Fleming [mailto:[EMAIL PROTECTED] ]
Sent: Friday, September 23, 2005 12:18 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Refreshing multi table screens

RB7.1 FRC14

On a two table form, the user can click on a button to "closed the work
order" and the PK row and FK row(s) are added to a "closed table",
deleted from the screen form the are viewing, and the next PK row is
displayed.
Refreshing the PK and FK tables in the EEP, only refreshes the PK
portion of the form. Using Nextrow/Prevrow will cause a cursor error
message. I have had a chance to "play" with this a lot the last few days
but still coming up short.

Note: By having the R> window behind my app when it is running has
really help clear up a number of bugs. For example, if you have an EEP
which is run when you Save a Row... don't put Saverow in that EEP!

TIA,

Dennis
*****
Dennis Fleming
IISCO
http://www.TheBestCMMS.com
Phone: 570 775-7593
Mobile: 570 351-5290


Dennis Fleming
IISCO
http://www.TheBestCMMS.com
Phone: 570 775-7593
Mobile: 570 351-5290


Dennis Fleming
IISCO
http://www.TheBestCMMS.com
Phone: 570 775-7593
Mobile: 570 351-5290


Dennis Fleming
IISCO
Phone: 570 775-7593
Mobile: 570 351-5290

Reply via email to