|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ExecuteDataSet, Reader, non query and...Hi,
Could you tell me which of the sql commands execute commands to be used for best in the situation I am in. I will call a SP, which will return A SINGLE ROW with the details of the ID, I pass to it as the Input Parameter. As in 1. ExecuteReader 2. ExecuteScalar 3. ExecuteDataSet 4. ExecuteNonQuery I am using latest version of Micrsoft Enterprise Library, Data Access Block. Thanks & Regards, Sugandh Jain And the correct answer is 1.
2. returns you a singe value 3. doesn't exist (ok, it doesn't exist in ado.net but it probably exists in EL) 4. doesn't return anything -- Show quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "Sugandh Jain" <sugandh.j***@nirvana-sol.com> wrote in message news:uO9LTb0HHHA.4992@TK2MSFTNGP04.phx.gbl... > Hi, > Could you tell me which of the sql commands execute commands to be used > for best in the situation I am in. > > I will call a SP, which will return A SINGLE ROW with the details of the > ID, I pass to it as the Input Parameter. > As in > 1. ExecuteReader > 2. ExecuteScalar > 3. ExecuteDataSet > 4. ExecuteNonQuery > > I am using latest version of Micrsoft Enterprise Library, Data Access > Block. > > > Thanks & Regards, > Sugandh Jain > |
|||||||||||||||||||||||