Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with TABLEUPDATE()
Message
From
06/02/2002 13:35:59
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
06/02/2002 12:34:11
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00615959
Message ID:
00616206
Views:
25
>I thought I had done it right. I used DBSETPROP() to set DataType, DefaultValue, KeyField, Updatable, and UpdateName. What else do I need?
>
>Does the fact that I use local tables change anything?
>
>Thank you
>
>Bernard

Hi Bernard,
no, local tables does not matter,

IF you define your view programticaly this is an example for one table:
lcDBC = JUSTSTEM(DBC())
lcView = 'My_View'

 CREATE SQL VIEW (lcView) AS SELECT;
viewdefinition

 DBSETPROP(lcView+"","VIEW","SENDUPDATES",.T.)
 DBSETPROP(lcView+"","VIEW","WHERETYPE",3)
*Table
 DBSETPROP(lcView+"","VIEW","TABLES",lcDBC+"!MyTable")
*Tables Primary key
 DBSETPROP(lcView+".Ix","FIELD","UPDATENAME",lcDBC+"!MyTable.Ix") 
 DBSETPROP(lcView+".Ix","FIELD","UPDATABLE",.T.)
 DBSETPROP(lcView+".Ix","FIELD","KEYFIELD",.T.)
*Write to table field(s)
 DBSETPROP(lcView+".SomeField","FIELD","UPDATENAME",lcDBC+"!MyTable.SomeField")
 DBSETPROP(lcView+".SomeField","FIELD","UPDATABLE",.T.)
 DBSETPROP(lcView+".Parent_Ix","FIELD","UPDATENAME",lcDBC+"!MyTable.Some_Ix")
 DBSETPROP(lcView+".Parent_Ix","FIELD","UPDATABLE",.T.)
*non write to table  field
 DBSETPROP(lcView+".otherField","FIELD","UPDATENAME","")
 DBSETPROP(lcView+".otherField","FIELD","UPDATABLE",.F.)
IF you use the wizard to create the view, there is an page where you can set this.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform