As we know, SQL statements can be of simple type or may be parameterized. The parameterized query contains some parameters, which may be accepted through object of SqlParameter class. SqlParameter class is used to create the para...
Thursday, September 19, 2013
How to Execute SQL Statements: ADO.NET
We have learnt about ADO.NET object model. In that article we have created a SQL connection, open that connection and close that connection. To execute the SQL statements, we have to write them in between the open and close metho...
Monday, June 24, 2013
How to use HasRows property of SqlDataReader class
Use HasRows property of SqlDataReader class
Gets a value that indicates whether the SqlDataReader contains one or more rows (msdn.microsoft.com)
Step-1 : Create a database table with empty data
Step-2 : Check data in ...
Friday, June 21, 2013
what is the use of SqlDataReader in ASP.NET
SqlDataReader
Provides a way of reading a forward-only stream of rows from a SQL Server database ( source from msdn.microsoft.com)
Example How to bind gridview using SqlDataReader class
Step-1 : Take a Gridview onto design win...