Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Iam writing a stored procedure for insert operation. So, I need to display a confirmation message that record inserted successfully. Any one can help me.
Posted
Comments
choudhary.sumit 7-Dec-12 4:48am    
do you have any front end?

Create procedure Demo( parameter,...)
as
begin
insert into table_Name values('a');
print 'inserted successfully';
end
 
Share this answer
 
Declare @id int
INSERT INTO TableName(condition)
SELECT @id=SCOPE_IDENTITY()

IF(@id is not null)
SELECT ISNULL(@id,'')[Message]

-- That Message should be declared in frontend as return param



HOPE ITS CLEAR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900