Search
 
SCRIPT & CODE EXAMPLE
 

SQL

c# sqldatareader to list

List<someObject> objectList = new List<someObject>();
SqlDataReader rdr = cmd.ExecuteReader();

 while (rdr.Read())
{
	someObject o = new someObject();
	o.id = rdr["id"];
    o.name = rdr["name"];
    
 	objectList.Add(o);
}
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle partition table row count 
Sql :: sql inner join with where clause 
Sql :: postgresql get date from datetime 
Sql :: how to count number of rows in sql 
Sql :: MySQL get all previous date record 
Sql :: insert into using contant values and source table columns with sql 
Sql :: how to create external table in hive 
Sql :: database timezone 
Sql :: osx stop mysql service 
Sql :: rename column in table sql 
Sql :: SQL Less Than or Equal to Operator 
Sql :: postgresql filter on 
Sql :: sql formats 
Sql :: Index a database column sql 
Sql :: update trigger 
Sql :: mysql vs postgresql 
Sql :: oracle nvl 
Sql :: how to find all children of a record with only parent ID in sql 
Sql :: htaccess allow index 
Sql :: sql server split string last 
Sql :: sql where time stamp is in between 
Sql :: postgresql procedure example 
Sql :: show table mysql 
Sql :: sql server 2019 installation 
Sql :: query to find second highest salary 
Sql :: find mysql password 
Sql :: sql select from multiple tables without join 
Sql :: auto increment in postgresql 
Sql :: like in postgresql 
Sql :: how to export/import a mysql database via ssh 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =