Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement