Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot Save the change in updateable view.
Message
 
 
À
01/01/2001 21:57:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00458358
Message ID:
00458463
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform