Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last Insert Doesn't....
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Last Insert Doesn't....
Divers
Thread ID:
00609464
Message ID:
00609464
Vues:
45
OK....heres a good one. I've got form which asks for 10 items, and based on whether a field for an item is filled, it generates an INSERT statement and loads the contents of that field as well as a few other things into a table.

Here's the code:
IF NOT EMPTY(ALLTRIM(THISFORM.txtOutreach.VALUE))
    nCounter=nCounter+1
    INSERT INTO voltime (DATE, HOURS, TYPE, person_id);
        VALUES (THISFORM.txtDate.dVALUE, VAL(THISFORM.txtOutreach.VALUE);
                  'Outreach', cVolunteerID)
ENDIF
I got ten of these. 10 fields, and 10 IF/ENDIF blocks checking to see if the fields have data. However, if there is data in #10...the Insert statement does not work.

If I move the blocks around in the program, the insert statement works fine, and the last block still doesn't work. So the code within the blocks seems to be fine in any position Except the last position. Furthermore, the IF statmenent works fine, and the increment counter statement executes correctly.

I'm wondering if this is some kind of weird table buffering thing... and do I have to issue some kind of TABLEUPDATE() statement (I'm directly inserting to a table, not a view).

TIA
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform