MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 15th, 2004, 06:04 AM
dwalker23n dwalker23n is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 dwalker23n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Trigger starting stored procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway