Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update a table in a database with a view
Message
From
05/06/2007 04:23:19
 
 
To
05/06/2007 04:07:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01230467
Message ID:
01230474
Views:
22
Hi Ron,

the following example code shows the necessary commands to make a view updatable.
It was generated by the VFP 9.0 viewdesigner.
You might compare the lines to yours to make sure you are not missing one or more necessary statements.
DBSetProp(ThisView,"View","SendUpdates",.T.)
DBSetProp(ThisView,"View","BatchUpdateCount",1)
DBSetProp(ThisView,"View","CompareMemo",.T.)
DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
DBSetProp(ThisView,"View","FetchMemo",.T.)
DBSetProp(ThisView,"View","FetchSize",100)
DBSetProp(ThisView,"View","MaxRecords",-1)
DBSetProp(ThisView,"View","Prepared",.F.)
DBSetProp(ThisView,"View","UpdateType",1)
DBSetProp(ThisView,"View","UseMemoSize",255)
DBSetProp(ThisView,"View","Tables","northwind!Customers")
DBSetProp(ThisView,"View","WhereType",1)

DBSetProp(ThisView+".customerid","Field","DataType","C(5)")
DBSetProp(ThisView+".customerid","Field","UpdateName","northwind!Customers.customerid")
DBSetProp(ThisView+".customerid","Field","KeyField",.T.)
DBSetProp(ThisView+".customerid","Field","Updatable",.F.)

DBSetProp(ThisView+".companyname","Field","DataType","C(40)")
DBSetProp(ThisView+".companyname","Field","UpdateName","northwind!Customers.companyname")
DBSetProp(ThisView+".companyname","Field","KeyField",.F.)
DBSetProp(ThisView+".companyname","Field","Updatable",.T.)
Holger Vorberg
Germany
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform