Hello there
Given the following:
------------------
BEGIN TRANSACTION
INSERT INTO ServicePlans (PlanID, PlanName,
PlanDescription, PlanPrice, DiscountedPrice)
VALUES ('C1001', 'Tele-Training Course',
'Course on Telecommunications', 45.00, 35.00)
SAVE TRANSACTION Insert1
INSERT INTO Orders (CustomerID, PlanID,
OrderDate, CancelationDate)
VALUES (10, 'C1001', '11/27/01', NULL)
IF @@ERROR <> 0 ROLLBACK TRANSACTION Insert1
COMMIT TRANSACTION
-------------------
I'd like to display the return for @@Error when running the query. How can this be done?
Also, is @@error logical/boolean? (would "If @@ERROR ..." be the same as "If @@ERROR <> 0")?
Thank you in advance.
Chillay
Given the following:
------------------
BEGIN TRANSACTION
INSERT INTO ServicePlans (PlanID, PlanName,
PlanDescription, PlanPrice, DiscountedPrice)
VALUES ('C1001', 'Tele-Training Course',
'Course on Telecommunications', 45.00, 35.00)
SAVE TRANSACTION Insert1
INSERT INTO Orders (CustomerID, PlanID,
OrderDate, CancelationDate)
VALUES (10, 'C1001', '11/27/01', NULL)
IF @@ERROR <> 0 ROLLBACK TRANSACTION Insert1
COMMIT TRANSACTION
-------------------
I'd like to display the return for @@Error when running the query. How can this be done?
Also, is @@error logical/boolean? (would "If @@ERROR ..." be the same as "If @@ERROR <> 0")?
Thank you in advance.
Chillay