Click here to Skip to main content
15,885,216 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Syntax error in store procedure Pin
anubhaw.gupta25-Dec-12 22:45
anubhaw.gupta25-Dec-12 22:45 
GeneralRe: Syntax error in store procedure Pin
sathish s26-Dec-12 1:39
sathish s26-Dec-12 1:39 
GeneralRe: Syntax error in store procedure Pin
Zafar Sultan26-Dec-12 3:31
Zafar Sultan26-Dec-12 3:31 
Questionid or guid.. which one? Pin
Jassim Rahma25-Dec-12 7:22
Jassim Rahma25-Dec-12 7:22 
AnswerRe: id or guid.. which one? Pin
Sandeep Mewara25-Dec-12 19:14
mveSandeep Mewara25-Dec-12 19:14 
AnswerRe: id or guid.. which one? Pin
CommDev25-Dec-12 19:25
CommDev25-Dec-12 19:25 
Questionwhy should I care about ExecuteScalar Pin
Jassim Rahma25-Dec-12 5:57
Jassim Rahma25-Dec-12 5:57 
AnswerRe: why should I care about ExecuteScalar Pin
Sandeep Mewara25-Dec-12 19:30
mveSandeep Mewara25-Dec-12 19:30 
Jassim Rahma wrote:
ExecuteNonReader

I don't find a knowledge base article for the same in MSDN. Based on what I know and can infer, using it to get just a 'single' value will be an overhead. It should be used when database query is going to provide a set of records.

My guess, term in discussion is ExecuteNonQuery and should not be ExecuteNonReader.


Jassim Rahma wrote:
ExecuteScalar

Executes the query, and returns the first column of the first row in the result set returned by the query.
Refer: Refer: SqlCommand.ExecuteScalar Method [^]


Now, based on the details and documentation, for getting a count, ExecuteScalar fits in the best that will get me the result directly as needed.
Sandeep Mewara
Microsoft ASP.NET MVP 2012


[My Latest Article(s)]:
How to extend a WPF Textbox to Custom Picker
Server side Delimiters in ASP.NET

AnswerRe: why should I care about ExecuteScalar Pin
CommDev25-Dec-12 19:33
CommDev25-Dec-12 19:33 
AnswerRe: why should I care about ExecuteScalar Pin
CommDev25-Dec-12 19:40
CommDev25-Dec-12 19:40 
GeneralRe: why should I care about ExecuteScalar Pin
Jassim Rahma28-Dec-12 9:40
Jassim Rahma28-Dec-12 9:40 
GeneralRe: why should I care about ExecuteScalar Pin
Naveen Katta26-Dec-12 0:10
Naveen Katta26-Dec-12 0:10 
Questiona control that should contain html elements Pin
Ali Al Omairi(Abu AlHassan)23-Dec-12 23:01
professionalAli Al Omairi(Abu AlHassan)23-Dec-12 23:01 
QuestionRe: a control that should contain html elements Pin
jkirkerx24-Dec-12 13:09
professionaljkirkerx24-Dec-12 13:09 
AnswerRe: a control that should contain html elements Pin
Ali Al Omairi(Abu AlHassan)25-Dec-12 19:51
professionalAli Al Omairi(Abu AlHassan)25-Dec-12 19:51 
Questioncheckedchange event of gridview in javascript Pin
Ravi_kant23-Dec-12 19:29
Ravi_kant23-Dec-12 19:29 
AnswerRe: checkedchange event of gridview in javascript Pin
Sampath Kumar Sathiya24-Dec-12 0:20
Sampath Kumar Sathiya24-Dec-12 0:20 
GeneralRe: checkedchange event of gridview in javascript Pin
Ravi_kant24-Dec-12 7:40
Ravi_kant24-Dec-12 7:40 
Questionupdated data from gridview Pin
Member 970720723-Dec-12 0:30
Member 970720723-Dec-12 0:30 
AnswerRe: updated data from gridview Pin
Ali Al Omairi(Abu AlHassan)24-Dec-12 4:31
professionalAli Al Omairi(Abu AlHassan)24-Dec-12 4:31 
AnswerRe: updated data from gridview Pin
Sandeep Mewara25-Dec-12 19:35
mveSandeep Mewara25-Dec-12 19:35 
Question.net question Pin
Tarani Dutt Joshi21-Dec-12 23:53
Tarani Dutt Joshi21-Dec-12 23:53 
AnswerRe: .net question Pin
Richard MacCutchan22-Dec-12 0:18
mveRichard MacCutchan22-Dec-12 0:18 
AnswerRe: .net question Pin
MaulikDusara24-Dec-12 21:38
MaulikDusara24-Dec-12 21:38 
AnswerRe: .net question Pin
Sandeep Mewara25-Dec-12 19:33
mveSandeep Mewara25-Dec-12 19:33 

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.