The first case can be checked using HasRows flag
If the data is not read it can be done as follows:
SqlDataReader rdr = Cmd.ExecuteReader(); while (rdr.Read() == true) { string sName = rdr.GetString(1); }
Visual Studio .NET Tips and Tricks, VB.NET Code Samples, C# Code Snippets, ASP.NET Code Samples, .NET Tips and Tricks, C# Tips & Tricks, Visual Studio 2010, .NET Framework Code Samples, VB.NET Tips & Tricks
No comments:
Post a Comment