Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem updating a view
Message
De
29/12/1998 16:50:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00171363
Message ID:
00171370
Vues:
30
>ThisForm.SaveAll()
>...numerous lines of associated set up...
>SELECT vpOrderItemsSupplier
>n=0
>BEGIN TRANSACTION
>SCAN
> n=n+1
> IF NOT TableUpdate(0,.T., "vpOrderItemsSupplier")
> MESSAGEBOX( "The Order Items table was not updated for" +CHR(13)+ ;
> "record "+str(n) +CHR(13)+ ;
> "Report_Nam "+vpOrderItemsSupplier.Report_Nam +CHR(13)+ ;
> "Report_Num "+vpOrderItemsSupplier.Report_Num, ;
> MB_ICONEXCLAMATION+MB_OK, ;
> "Omnia Background Search - Saving Order Information")
> lSuccess = .F.
> lRetVal = .F.
> ENDIF
>ENDSCAN
>END TRANSACTION
>
>At this point an inspection of the OrderItems.dbf shows that the records are unchanged... I'm at a loss and need help!
>

Two things offhand strike me.
Your tablupdate does not look right. The first parameter is to tell if you want to update allrows .T. or one row .F.

Unrelated problem. You are'nt issuing a rollback.


BEGIN TRANSACTION
llSuccessfulUpdate = TableUpdate(.T.,.T., "vpOrderItemsSupplier" )
IF llSuccessfulUpdate
END TRANSACTION
ELSE
ROLLBACK
ENDIF
* END TRANSACTION

<\TEXT>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform