Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local view deleting original record...code enclosed
Message
 
À
09/08/2000 02:39:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00402662
Message ID:
00402664
Vues:
10
G'day Doug,

There's an option in the view designer to do updates in this way (delete and then insert). It's in the update criteria tab on the bottom right of the page.

The CURSORGETPROP() property is UpdateType - 1=update, 2=delete and insert

Cheers,

Andrew




>Hi,
>
>I am having a nasty problem with one of my local views. Whenever the following code is run, the original record in the base table is deleted and a new record created.
>
>***********************************************
>* Update the last_invno & last_invdate in jobhed
>vcJobIdNum = mjobidnum
>minvno = Varinvhed.invno
>SELECT vJobhed
>=REQUERY()
>IF RECCOUNT() <> 0
> REPLACE last_invno WITH minvno,last_invdate WITH oParameter.dParm1,ed_date WITH gdSysDate, ;
> exp_type WITH IIF(EMPTY(exp_type),'C',exp_type),username WITH gcUserName
> IF TABLEUPDATE(.T.) = .F.
> ?? CHR(7)
> =MESSAGEBOX('Unable to update this record!',0+48,'&gcMessage')
> =TABLEREVERT(.T.)
> ENDIF
>ENDIF
>************************************************
>
>I have never come across this problem before (have been using parameterised views a while).
>
>I am using VFP6 SP3 on a WIN NT 4.0 SP5 WorkStation.
>
>I hope some one can help.
>
>Regards
>Doug Johnston


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform