Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger Failed for Append Blank
Message
 
 
To
03/01/1999 02:15:54
Daniel Christensen
University of Wisconsin River Falls
River Falls, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172229
Message ID:
00172246
Views:
28
>I've created a form in VFP5 through which I would like to be able to add new records to a given table in my database. I've put a "New Record" button on the form and filled in the 'click' event as follows:
>
>(Sparing the details on steps 1&2)
>1. Disable all buttons and fields not needed during edit
>2. Enable all buttons and fields that are needed during edit
>3. BEGIN TRANSACTION
>4. APPEND BLANK
>
>At this point I get an error message that says that the "Trigger Failed". It is my understanding that data entered within a transaction does not actually get written back to the database until an 'END TRANSACTION' is encountered and therefore should not call any of the triggers until that point.
>
>Can anyone help me out with the reason behind this error? Any help would be greatly appreciated.
>
>Thanks,
>Dan Christensen

Is the table you are adding records to bufered? I also tend to look at transactions as a series of SQL --

Insert Into MyTable (field list) values (field values)

etc...

Come to think of it, I have not used an append blank in my VFP apps for a couple of years now. The problem with append blank is mainly a conflict with primary keys. Your PK has great potential to return an error because the newly appended record has no PK as may another record in the table.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform