Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update two tables together
Message
De
05/07/2004 11:44:59
 
 
À
05/07/2004 10:43:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00920730
Message ID:
00920751
Vues:
19
Reza

I don't know why you named the thread "Update two tables together". Do you mean "Update the underlying tables when change a value in a view"? Essentially I think this is it.

In stead of creating a cursor via SQL select, why not create a view in the database. You can edit the view, via the view editor and, on the "Update Criteria" tab, can set the view to "send SQL Updates". That is, when you change data in the view, the underlying table(s) is/are updated.

Also, you can bind your grid to the view, just as if it were a table.

In case you didn't know, a view is just like an SQL select, only its effect is like permanent, in that you can use the view over and over again, without having to write the SQL. Indeed the view editor writes the SQL for you, which is stored in the .DBC container. If you've already written the SQL then you can make it a view by the "Create SQL View" command.

HTH

Terry

>hi all
>i have a table by 30 fields and 300 records
>i create a cursor by sqlstatement from it with selecting 5 fields from it
>i create a form and put on it a grid and bind to it this cursor
>i want if change any fields or row in this grid, master table updated by new value from cursor
>i use vfp7
>please help me , it is very important for me
>if your describtion would be with sample it is better for me
>tanks all
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform