Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update two tables together
Message
From
05/07/2004 11:44:59
 
 
To
05/07/2004 10:43:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00920730
Message ID:
00920751
Views:
18
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform