Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table buffering error
Message
De
06/11/2001 18:13:47
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00577587
Message ID:
00578287
Vues:
29
This message has been marked as the solution to the initial question of the thread.
>>
>>Any errors?
>Nope
>Did it update the product table?
>Yep
>>
>>Do you see why we are doing it this?
>Nope

At least you are honest! *grin*

The current update code is almost the same as the code you commented out (accept you had added a cursorSetProp() command, I noticed). I am trying to isolate code that works, and trying to find code in the existing form breaks it.

So, we have it almost working, but we still don't know what combination of events makes the REPLACE command error out.

Well, let's put this code at the bottom of the method that you have been having problems with. We are going to hard code the season (it feels like season 25 to me *grin*). Then, compile and let 'er rip. No need to click on the new commandButton...just your original button.
local lcInvoice_ID, lnCurrentSeason
lnInvoice_ID = InvoiceHeader.invoice_id

lnCurrentSeason = 25

activate screen
set deleted on
Select * from InvoiceDetail Where Invoice_ID = lnInvoice_ID ;
    into cursor InvLinesCursor
? "Records selected: ",_tally
select invLinesCursor
scan   && we are scanning invLinesCursor, not invoiceDetail table
    if indexseek (InvLinesCursor.Product_ID, .t., 'product', 'product_id')
        * product found
        ? "updating product: ",invLinesCursor.Product_ID
        select product
	Replace UseSeason with lnCurrentSeason
    else
        * product not found...error processing here
        * referential integrity is supposed to prevent this
        ? "Error, product not found: ",invLinesCursor.Product_ID
    endif
endscan
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform