Top "Sqldatareader" questions

Provides a way of reading a forward-only stream of rows from a SQL Server database.

Read data from SqlDataReader

I have a SQL Server 2008 database and I am working on it in the backend. I am working on asp.…

c# asp.net sql-server-2008 sqldatareader
SQL Data Reader - handling Null column values

I'm using a SQLdatareader to build POCOs from a database. The code works except when it encounters a null value …

c# sqldatareader
How to get number of rows using SqlDataReader in C#

My question is how to get the number of rows returned by a query using SqlDataReader in C#. I've seen …

c# sqldatareader
Can you get the column names from a SqlDataReader?

After connecting to the database, can I get the name of all the columns that were returned in my SqlDataReader?

c# ado.net sqldatareader
how to check if a datareader is null or empty

I have a datareader that return a lsit of records from a sql server database. I have a field in …

c# null sqldatareader
Check for column name in a SqlDataReader object

How do I check to see if a column exists in a SqlDataReader object? In my data access layer, I …

c# .net sqldatareader
SQLDataReader Row Count

I am trying to get the number of rows that were returned by iterating the reader. But I always get 1 …

c# sql sqldatareader
How to display database records in asp.net mvc view

Using ASP.NET MVC with C#, how do you pass some database records to a View and display them in …

c# asp.net-mvc sqldatareader sqlclient
Unable to cast object of type 'System.Int32' to type 'System.String' in DataReader.GetString()

I was trying to add data from a database to acombobox. try { SqlCeCommand com = new SqlCeCommand("select * from Category_Master", …

c# sqldatareader
How to check if SQLDataReader has no rows

I am trying to figure out how to check if my SqlDataReader is null or has no rows (meaning the …

c# sqldatareader