Click here to Skip to main content
11,414,561 members (69,439 online)
   

ASP.NET

 
AnswerRe: Syntax error in store procedure Pin
anubhaw.gupta25-Dec-12 23:45
memberanubhaw.gupta25-Dec-12 23:45 
GeneralRe: Syntax error in store procedure Pin
sathish s26-Dec-12 2:39
membersathish s26-Dec-12 2:39 
GeneralRe: Syntax error in store procedure Pin
Zafar Sultan26-Dec-12 4:31
memberZafar Sultan26-Dec-12 4:31 
Questionid or guid.. which one? Pin
Jassim Rahma25-Dec-12 8:22
memberJassim Rahma25-Dec-12 8:22 
AnswerRe: id or guid.. which one? Pin
Sandeep Mewara25-Dec-12 20:14
mvpSandeep Mewara25-Dec-12 20:14 
AnswerRe: id or guid.. which one? [modified] Pin
CommDev25-Dec-12 20:25
memberCommDev25-Dec-12 20:25 
Questionwhy should I care about ExecuteScalar Pin
Jassim Rahma25-Dec-12 6:57
memberJassim Rahma25-Dec-12 6:57 
AnswerRe: why should I care about ExecuteScalar Pin
Sandeep Mewara25-Dec-12 20:30
mvpSandeep Mewara25-Dec-12 20: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 20:33
memberCommDev25-Dec-12 20:33 
AnswerRe: why should I care about ExecuteScalar Pin
CommDev25-Dec-12 20:40
memberCommDev25-Dec-12 20:40 
GeneralRe: why should I care about ExecuteScalar Pin
Jassim Rahma28-Dec-12 10:40
memberJassim Rahma28-Dec-12 10:40 
GeneralRe: why should I care about ExecuteScalar Pin
Naveen Katta26-Dec-12 1:10
memberNaveen Katta26-Dec-12 1:10 
Questiona control that should contain html elements [modified] Pin
Ali Al Omairi(Abu AlHassan)24-Dec-12 0:01
memberAli Al Omairi(Abu AlHassan)24-Dec-12 0:01 
QuestionRe: a control that should contain html elements Pin
jkirkerx24-Dec-12 14:09
memberjkirkerx24-Dec-12 14:09 
AnswerRe: a control that should contain html elements Pin
Ali Al Omairi(Abu AlHassan)25-Dec-12 20:51
memberAli Al Omairi(Abu AlHassan)25-Dec-12 20:51 
Questioncheckedchange event of gridview in javascript Pin
Ravi_kant23-Dec-12 20:29
memberRavi_kant23-Dec-12 20:29 
AnswerRe: checkedchange event of gridview in javascript Pin
Sampath Kumar Sathiya24-Dec-12 1:20
memberSampath Kumar Sathiya24-Dec-12 1:20 
GeneralRe: checkedchange event of gridview in javascript Pin
Ravi_kant24-Dec-12 8:40
memberRavi_kant24-Dec-12 8:40 
Questionupdated data from gridview Pin
Member 970720723-Dec-12 1:30
memberMember 970720723-Dec-12 1:30 
AnswerRe: updated data from gridview Pin
Ali Al Omairi(Abu AlHassan)24-Dec-12 5:31
memberAli Al Omairi(Abu AlHassan)24-Dec-12 5:31 
AnswerRe: updated data from gridview Pin
Sandeep Mewara25-Dec-12 20:35
mvpSandeep Mewara25-Dec-12 20:35 
Question.net question Pin
Tarani Dutt Joshi22-Dec-12 0:53
memberTarani Dutt Joshi22-Dec-12 0:53 
AnswerRe: .net question Pin
Richard MacCutchan22-Dec-12 1:18
mvpRichard MacCutchan22-Dec-12 1:18 
AnswerRe: .net question Pin
MaulikDusara24-Dec-12 22:38
memberMaulikDusara24-Dec-12 22:38 
AnswerRe: .net question Pin
Sandeep Mewara25-Dec-12 20:33
mvpSandeep Mewara25-Dec-12 20:33 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150427.4 | Last Updated 27 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid