TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
modeste modeste
NA
28
9.4k
how to display a message from database SQL to visual studio
Jul 5 2013 10:57 AM
hi every one ama coming back again on this nice website which is helping me a lot in asp.net
but now am coming back with a question in sql server.
i have a problem of how i can display a message from database to the interface in asp.net
i can do this when it is about an error but i want to display a message telling to the student
that the assignment date is approching in 3 days how can do this? i can print a message but i do not know
how i can in visual studio because it will not be as an error . THANK YOU SO MUCH!
HERE BELOW THIS IS MY CODE
---------------------------------------------
USE [DBOACS]
GO
/****** Object: StoredProcedure [dbo].[assgnmentcheckDeadLlinePeriod] Script Date: 07/05/2013 14:04:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO -- THOSE THE FIELD IN THE TABLE STUDENTSENTASSIGNMENT DateSent is the date on which the student will send it
ALTER procedure [dbo].[assgnmentcheckDeadLlinePeriod](@CourseCode nvarchar(50),
@AssignmentDescription nvarchar(400),@AssignmentFileName nvarchar(80),@assignmentFilePath nvarchar(550), @DateSent datetime,
@StudentId nvarchar(50))
as
declare @DATEEXPRE datetime
set @DATEEXPRE = (select max(AssignmentDeadLineDate) from LecturerAssignmentTable where AssignmentDescription = @AssignmentDescription)
if (@DATEEXPRE>@DateSent)
begin
INSERT INTO [DBOACS].[dbo].[studentSentAssignmentsTBL]
VALUES (@CourseCode,@AssignmentDescription,@AssignmentFileName,@assignmentFilePath,@DateSent,@StudentId)
end
else
begin
raiserror('Sorry you are too late to send this assignment!',16,1)
end
---- changing date
--
--declare @days int
--set @days=datediff(day,getdate(),'6/25/2013 12:00:00 AM')
-- if(@days=3)
--begin
--raiserror('your ass is remainning with 3 days',16,1)
--end
----end chaking dates
-- else
-- begin
----raiserror('Sorry you are late to send this assignment',16,1)
-- END
--exec assgnmentcheckDeadLinTimes 'INSY 765','testass','df','','7/19/2013','12121'
Reply
Answers (
3
)
could you please tell meabout catching in asp.net ?
View image depend upon query result count?