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
Prasad Bhagat
NA
516
235.5k
retun the db value after proc execute in json?
Aug 26 2015 10:18 AM
ALTER PROCEDURE [dbo].[abc]
@FriendNumber VARCHAR(20),
@CountryCode VARCHAR(10),
@OS VARCHAR(20),
@Token VARCHAR(200)
AS
BEGIN
BEGIN TRY
IF (SELECT COUNT(*) FROM dbo.DeviceMaster
WHERE Number = @FriendNumber AND CountryCode = @CountryCode) = 0
BEGIN
--ASK FRIEND TO DOWNLOAD THE APP
SELECT 'Send App. download link to Friend' AS STATUSMSG, -2 AS STATUSIND
END
ELSE
BEGIN
DECLARE @DeviceId BIGINT
DECLARE @FriendDeviceId BIGINT
SELECT @DeviceId = Id
FROM dbo.DeviceMaster
WHERE Token = @Token AND OS = @OS
SELECT @FriendDeviceId = Id
FROM dbo.DeviceMaster
WHERE Number = @FriendNumber AND CountryCode = @CountryCode
INSERT INTO dbo.Friends
(DeviceId,
FriendDeviceId,
FriendNumber,
AddedDate)
VALUES
(@DeviceId,
@FriendDeviceId,
@FriendNumber,
GETDATE())
SELECT 'Friend addedd successfully.' AS STATUSMSG, 1 AS STATUSIND
END
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE() AS STATUSMSG, -1 AS STATUSIND
END CATCH
END
how to retun this value in my asp.net application in json
Reply
Answers (
2
)
DESKTOP APPLICATION DEPLOYMENT
Need Help!