
November 15th, 2004, 06:04 AM
|
|
Registered User
|
|
Join Date: Nov 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Trigger starting stored procedure
CREATE TRIGGER check_availablerooms ON Reservation
AFTER INSERT
AS
DECLARE @Startdate varchar(20)
DECLARE @Enddate varchar(20)
SELECT @Startdate = ArrivalDate FROM INSERTED
SELECT @Enddate = DepatureDate FROM INSERTED
IF (@Startdate <> 'NULL' AND @EndDate <> 'NULL')
BEGIN
EXECUTE print_availablerooms @Startdate, @Enddate
END
Made this trigger so that all available rooms in the inserted period should show up on the screen. The trigger is working fine in Query Analyzer, but when i try to use it in Access it doesn't produce the result i want.
I want the trigger to run the stored procedure using the arrivaldate and departuredate entered in access as the input arguments.
Does anyone have a solution to this problem? I hope someone can post a code-example or a well described solution to this problem.
|