Problem with posting a change 
Author Message
 Problem with posting a change

Hi,
        In a form I have 2 tables in a 1:1 relationship. The tables are
linked on the first, mi and last names. I am trying to change the name in
one table and correspondingly change it in the other table. The
changeValue() method calls the locate() method on a TCursor on the second
table. When a change is made in the first table, the corresponding record
in the second table is found, but the changes don't get posted.

Could anyone help me out with this.

Thanks in advance

Anand




Sun, 10 Oct 1999 03:00:00 GMT
 Problem with posting a change

Hi Anand:

This is how I accomplish what you are trying to do. Hope this helps. Film
Title changevalue calls the procedure. Variables oldTitle, newTitle and occur
are declared globally. You, of course will not need the "scan" since your
dealing with a 1:1 relationship. oldTitle captures the old title before the
changevalue and newTitle captures the new title after the changevalue. In your
case instead of title you would use name.

Hope this helps.

Regards,

David.

proc ChkBoxFilmTitle()

var choice string endvar

 if oldTitle <> newTitle then

choice = msgQuestion("Title Change Confirmation.","You have modified an
existing Film Title. Do you wish to update ALL Boxoffice Records?")

 switch
     case choice = "Yes" :
         occur = 0
         adjFilmTC.open("Boxoff.db")
         adjFilmTC.edit()

              scan adjFilmTC for adjFilmTC."Film Title" = OldTitle :
                      adjFilmTC."Film Title" = NewTitle
                      occur = occur + 1
              endscan

 message("Changed Film Title in " +strVal(occur) + " Boxoffice Records...")
              adjFilmTC.endEdit()
              adjFilmTC.close()

     case choice = "No" : message("No Boxoffice Records were changed...")
endswitch
endif
endproc


Quote:

>Hi,
>        In a form I have 2 tables in a 1:1 relationship. The tables are
>linked on the first, mi and last names. I am trying to change the name in
>one table and correspondingly change it in the other table. The
>changeValue() method calls the locate() method on a TCursor on the second
>table. When a change is made in the first table, the corresponding record
>in the second table is found, but the changes don't get posted.

>Could anyone help me out with this.

>Thanks in advance

>Anand



..coming to you from Canada, the best country on the planet!

:
..ever feel like the only tree in a dog kennel?


Mon, 11 Oct 1999 03:00:00 GMT
 Problem with posting a change

Quote:

> Hi,
>         In a form I have 2 tables in a 1:1 relationship. The tables are
> linked on the first, mi and last names. I am trying to change the name in
> one table and correspondingly change it in the other table. The
> changeValue() method calls the locate() method on a TCursor on the second
> table. When a change is made in the first table, the corresponding record
> in the second table is found, but the changes don't get posted.

> Could anyone help me out with this.

> Thanks in advance

> Anand



I don't use it very often myself, but this seems like a good place to
put referential integrigy to work.

Al Solter



Tue, 12 Oct 1999 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. HTTP POSTed SQL string problem after named pipes to TCP/IP change

2. Having problem with POST while using it for posting data in a multi record block

3. SQL Travel Timetables repost [post post post apology etc]

4. Travel Timetables repost [post post post apology etc]

5. Please Help Second Post - process could not enumerate changes at

6. Changing character set post installation

7. Posting an update gram without changing HTML page

8. VB Posts changes to Table even without an Update

9. Q:Posting changes within a transaction (Capability not Supported)

10. .post looks OK but changes not actually going into .db file

11. Posting changes doesn't always work!!!

12. How to prevent from changing any data posted.


 
Powered by phpBB® Forum Software