Click here to Skip to main content
15,884,177 members
Home / Discussions / C#
   

C#

 
GeneralRe: Answer this question Pin
#realJSOP24-Dec-10 9:55
mve#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 
QuestionAppend Tiff To Tiff Pin
Kevin Marois23-Dec-10 7:14
professionalKevin Marois23-Dec-10 7:14 
AnswerRe: Append Tiff To Tiff Pin
Dave Kreskowiak23-Dec-10 8:58
mveDave Kreskowiak23-Dec-10 8:58 
QuestionSeeking advice for learning how to create small LOB applications in C# Pin
Duke Carey23-Dec-10 3:42
professionalDuke Carey23-Dec-10 3:42 
AnswerRe: Seeking advice for learning how to create small LOB applications in C# Pin
Not Active23-Dec-10 5:14
mentorNot Active23-Dec-10 5:14 
GeneralRe: Seeking advice for learning how to create small LOB applications in C# Pin
Duke Carey23-Dec-10 6:18
professionalDuke Carey23-Dec-10 6:18 
GeneralRe: Seeking advice for learning how to create small LOB applications in C# Pin
Not Active23-Dec-10 8:16
mentorNot Active23-Dec-10 8:16 
GeneralRe: Seeking advice for learning how to create small LOB applications in C# Pin
#realJSOP23-Dec-10 10:35
mve#realJSOP23-Dec-10 10:35 
GeneralRe: Seeking advice for learning how to create small LOB applications in C# Pin
Duke Carey24-Dec-10 1:13
professionalDuke Carey24-Dec-10 1:13 
AnswerRe: Seeking advice for learning how to create small LOB applications in C# Pin
SledgeHammer0123-Dec-10 8:32
SledgeHammer0123-Dec-10 8:32 

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.