Click here to Skip to main content
15,881,281 members

Comments by db_developer (Top 2 by date)

db_developer 27-Jun-13 5:01am View    
thanks for reference about optimization
db_developer 24-Jun-13 19:26pm View    
I agree with answer and want to add:

your query can return more than 1 row and will return 2 columns, therefore ExecuteScalar() is not acceptable.
Use ExecuteReader() and Reader.ReadLine then.
or
edit procedure query using SELECT TOP 1 AdminName at beginning.