Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursorsetprop() +tablerevert()
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00067244
Message ID:
00067300
Vues:
32
>>>>>I've got the tablerevert working ok on a form whereas all changes to a record are undone upon 'Abort' but how do I undo an 'Append blank' if the user chooses to 'Abort' halfway thru?
>>>>
>>>>If you use table buffering, tablerevert will revert the append blank. I usually use a second form with no bound objects to collect required data. If the user does not accept, I discard data -- no harm, no foul. If accepted, I populate a 1 dimensional array and use INSERT-SQL then TABLEUPDATE to add the new record.
>>>
>>>You still have to invoke an 'append blank' ?
>>
>>No.
>>Dimension MyArray(3)
>>MyArray(1)=PrimaryKeyIdFromMyIdGeneratorFunction()
>>MyArray(2)=ThisForm.Textbox1
>>MyArray(3)=ThisFrom.textbox2
>>Insert into myTable from array MyArray
>The 3 array values have to be the data types of the first 3 (corrected from pervious reply) fields in the table. I also made assumption that field 1 would be a Primary key generated by your primary key id generator.

I actually use a DIMENSION MyARRAY(1,3) which would make:
MyArray(1,1)=...
MyArray(1,2)=... etc.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform