Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete of Grid highlighted row, not deleting RecordSourc
Message
 
 
À
21/05/2003 16:23:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00791322
Message ID:
00791375
Vues:
20
Hi,

How did you find, that records were not deleted? Of course, you know, that in Foxpro unlike other databases records are just marked for deletion (e.g. you'll see a black mark near each deleted record in Browse window if you have set deleted off). In order to actually remove records from the table, you would need to use PACK command, which requieres exclusive access.

I don't see problems with the code, though I don't understand the reason for locking a record. Do you use buffering?

>I have a Grid with Parent-LinkMaster <-> Child-RecordSource relationship. I have a button on Form (.SCX) that Deletes highlighted record in Grid. The row data disappears when I execute my Delete code, but the underlying RecordSource data table is not removing the record deleted through form.
>
>Here is my underlying code:
>
>IF MESSAGEBOX("Delete this EAR Drawing Association?"+CHR(13)+CHR(13)+DD_EarAppDwg.rd_dsort, ;
> d_nQuestionmark+d_nYesno+d_ndefaultsecond,"Delete EAR Drawing Association")=d_nYes
> nSelectWas = SELECT()
> SELECT DD_EarAppDwg
> DO WHILE NOT RLOCK()
> ENDDO
> DELETE
> GO RECNO()
> UNLOCK
> THISFORM.REFRESH()
> SELECT (nSelectWas)
>ELSE
> WAIT WINDOW TIMEOUT 3 "Record Association Not Deleted."
>ENDIF
>
>Can anyone see the problem?
>
>Fred Z
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform