|
-
Jun 4th, 2003, 05:19 PM
#1
Thread Starter
New Member
Trigger and VB Code locking horns
I have an invoice form with two ado controls on it, one for the overall invoice information, like the ID number, customer, etc., and the other for the line items.
This form has been working without a problem until I recently added an update trigger to the orders table. The trigger responds to changes in an order's Status field. If Status is changed to "VOID", the trigger looks at each line item associated with this order, and increases the OnHand counter for each of the corresponding products by the Quantity in the line item. And it does the opposite if the status is changed from "VOID" to anything else. When I test this trigger in the SQL Enterprise Manager, it operates perfectly.
However, when I run my VB application and change the Status of an Invoice to or from "VOID", I get the following error message:
"Key column information is insufficient or incorrect. Too many rows were affected by update."
Thanks in advance for any ideas about what's causing this and what I can do about it.
-
Jun 5th, 2003, 12:57 PM
#2
Hyperactive Member
Try adding a primary key on the table you are updating and see what happens.
-
Jun 5th, 2003, 03:12 PM
#3
Thread Starter
New Member
All my tables already have primary key fields.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|