Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot Save the change in updateable view.
Message
 
 
To
01/01/2001 21:57:15
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00458358
Message ID:
00458463
Views:
14
What error, if any, does it give you? Or does it just not write the changes back?

By default, views do not have the key field selected for update. Maybe the initial save is not saving the key so there is no way to subsequently update it.

>I have a locate view as
>
>CREAT SQL VIEW vpr AS;
> SELE id,pr,reqDate,dept,shortname,itemcode,pr.desc,stkinhd,qty,;
> unit,uprice,ok,relByHead,po,remark,appRmk,purApp,prDate,;
> appQty,appAmt,appPrice,amount,purpose,userId,keyInDate;
> FROM pr,dept ;
> WHERE pr.dept = dept.code AND;
> dept = ?mdept AND;
> BETWEEN(userid,?mUser1,?mUser2) AND;
> BETWEEN(amount,?mamt1,?mamt2) AND;
> BETWEEN(pr,?mpr1,?mpr2) AND;
> BETWEEN(relByHead,?mRelByHead1,?mRelByHead2) ;
> ORDER BY pr,ok
>
>dbsetprop("vPr","VIEW","SendUpdates",.T.)
>dbsetprop("vPr.ID","field","default","getkey('PR')")
>
>I use it in a data entry form. The form have a command button and the click method :
>
>SELE vPr
>IF !TABLEUPDATE()
> WAIT WIND 'Cannot Save the Record, Please try later.'
> =TABLEREVERT()
>ENDIF
>
>I can save new record to base table (pr). But when I edit the record and want to save it, system disallow me to save the change. Why??
>
>
>TIA.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform