Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem updating a view
Message
From
29/12/1998 16:50:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00171363
Message ID:
00171370
Views:
29
>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>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform