Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table buffering error
Message
 
À
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:
00578293
Vues:
33
You da man!
I'm updating just fine.
Even changed it to be the current season variable and it worked.
However, I don't understand how changing a cursor changes the table.
Well, I've got to get going. I'm actually sick. I was doing OK, but it's getting worse as the day goes on. I'm just so happy to have this thing updating though.
Any insite on cursors would be appreciated too.
Thanks again for everything.


>>>
>>>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
>
___________________________
Kenneth Wonderley
http://www.wonderley.com


...the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness and self-control.
Galatians 5:22 & 23
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform