Click here to Skip to main content
15,914,014 members
Home / Discussions / C#
   

C#

 
AnswerRe: Answer this question Pin
RaviRanjanKr24-Dec-10 4:43
professionalRaviRanjanKr24-Dec-10 4:43 
AnswerRe: Answer this question Pin
OriginalGriff24-Dec-10 4:53
mveOriginalGriff24-Dec-10 4:53 
AnswerRe: Answer this question Pin
RobCroll24-Dec-10 4:59
RobCroll24-Dec-10 4:59 
GeneralRe: Answer this question Pin
OriginalGriff24-Dec-10 5:02
mveOriginalGriff24-Dec-10 5:02 
GeneralRe: Answer this question Pin
RobCroll24-Dec-10 5:27
RobCroll24-Dec-10 5:27 
AnswerRe: Answer this question Pin
thatraja24-Dec-10 5:43
professionalthatraja24-Dec-10 5:43 
AnswerRe: Answer this question Pin
fjdiewornncalwe24-Dec-10 5:52
professionalfjdiewornncalwe24-Dec-10 5:52 
AnswerRe: Answer this question Pin
#realJSOP24-Dec-10 7:57
professional#realJSOP24-Dec-10 7:57 
GeneralRe: Answer this question Pin
Richard MacCutchan24-Dec-10 9:53
mveRichard MacCutchan24-Dec-10 9:53 
GeneralRe: Answer this question Pin
#realJSOP24-Dec-10 9:55
professional#realJSOP24-Dec-10 9:55 
AnswerRe: Answer this question Pin
Hiren solanki24-Dec-10 16:17
Hiren solanki24-Dec-10 16:17 
QuestionLocal directory in c# Asp.net Pin
abbd23-Dec-10 23:23
abbd23-Dec-10 23:23 
AnswerRe: Local directory in c# Asp.net Pin
OriginalGriff23-Dec-10 23:39
mveOriginalGriff23-Dec-10 23:39 
AnswerRe: Local directory in c# Asp.net Pin
RaviRanjanKr24-Dec-10 0:38
professionalRaviRanjanKr24-Dec-10 0:38 
AnswerRe: Local directory in c# Asp.net Pin
Richard MacCutchan24-Dec-10 9:53
mveRichard MacCutchan24-Dec-10 9:53 
AnswerRe: Local directory in c# Asp.net Pin
GenJerDan27-Dec-10 3:44
GenJerDan27-Dec-10 3:44 
QuestionRetrieving return value from stored procedure Pin
Łukasz Nowakowski23-Dec-10 22:05
Łukasz Nowakowski23-Dec-10 22:05 
I have a stored procedure (MS SQL 2008), that inserts single row to a table and returns id (primary key column, that has identity set) of the inserted row. Id column type is set to BIGINT.
I return the inserted id with the line
RETURN CONVERT(BIGINT, SCOPE_IDENTITY())

to make sure, that it is casted to the type I need.
However, when I retrieve data in application that is calling the procedure, return value is of type Int32, not Int64.
I'm getting the return value this way (only the significant lines):
SqlCommand command = new SqlCommand();<br />
// some parameters for the values to insert<br />
SqlParameter returnVal = new SqlParameter("ReturnValue", null);<br />
returnVal.Direction = ParameterDirection.ReturnValue;<br />
// call the procedure<br />
long? temp = ((IDataParameter)command.Parameters["ReturnValue"]).Value as long?;


And, unfortunately, the Value of "ReturnValue" parameter is int, not long, so temp is null...
What am I missing?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.

AnswerRe: Retrieving return value from stored procedure Pin
RobCroll24-Dec-10 5:12
RobCroll24-Dec-10 5:12 
GeneralRe: Retrieving return value from stored procedure Pin
Łukasz Nowakowski24-Dec-10 8:27
Łukasz Nowakowski24-Dec-10 8:27 
Questionhelp!why the event 'SystemEvents_PowerModeChanged' can not running in the windows service. Pin
scoket23-Dec-10 15:13
scoket23-Dec-10 15:13 
AnswerRe: help!why the event 'SystemEvents_PowerModeChanged' can not running in the windows service. Pin
Not Active23-Dec-10 18:13
mentorNot Active23-Dec-10 18:13 
GeneralRe: help!why the event 'SystemEvents_PowerModeChanged' can not running in the windows service. [modified] Pin
scoket23-Dec-10 21:30
scoket23-Dec-10 21:30 
Questionhow to answer this question Pin
mohammed alshaweesh23-Dec-10 13:20
mohammed alshaweesh23-Dec-10 13:20 
AnswerRe: how to answer this question Pin
Dr.Walt Fair, PE23-Dec-10 15:32
professionalDr.Walt Fair, PE23-Dec-10 15:32 
AnswerRe: how to answer this question Pin
JF201523-Dec-10 23:17
JF201523-Dec-10 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.