Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursorsetprop() +tablerevert()
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00067244
Message ID:
00067273
Views:
22
>>>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 tpes of the first 5 fields in the table. I also made assumption that field 1 would be a Primary key generated by your primary key id generator.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform