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
Abey Varghese
NA
18
9.4k
Return a variable from stored procedure in entity framework
Jun 20 2013 5:31 PM
I Need to return a value from a stored procedure using entity framework.
My stored procedure is.
ALTER
PROCEDURE
[dbo]
.
[okc_usp_CheckWorkOrderId]
@TemplateCheck
VARCHAR
(
12
)
,
@FromDate
SMALLDATETIME
,
@IDValue
NUMERIC
(
10
,
0
)
,
@WorkOrderID
VARCHAR
(
20
)
,
@ChildDate
SMALLDATETIME
--@Flag bit OUTPUT
AS
BEGIN
DECLARE
@Flag
bit
;
set
@Flag
=
0
;
IF
(
SUBSTRING
(
@Templatecheck
,
DATEPART
(
MONTH
,
@FromDate
),
1
)
=
1
AND
NOT
EXISTS(
SELECT
WORKORDERID
FROM
azteca
.
WORKORDER
WHERE
WORKORDERID
=
@IDValue
)
AND
NOT
EXISTS
(
SELECT
WORKORDERID
FROM
azteca
.
WORKORDER
WHERE
SOURCEWOID
=
@WorkOrderID
AND
FROMDATE
=
@ChildDate
AND
CYCLETYPE
=
'A'
))
BEGIN
Set
@Flag
=
1
END
ELSE
BEGIN
Set
@Flag
=
0
END
RETURN
@Flag
END
My code is:
using
(
CWPRTestEntities
ctx =
new
CWPRTestEntities
())
{
int
Flag= ctx.okc_usp_CheckWorkOrderId(TemplateCheck, FromDate, IDValue, WorkorderID, ChildDate);
}
Error: Best overloaded method match for ....has some invalid arguments.
Reply
Answers (
3
)
Unable to Overlap the dataseries on the same chart
C# DataGridView with Identity Column