Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Get the Db column names from a SqlDataReader

var reader = cmd.ExecuteReader();

var columns = new List<string>();

for(int i=0;i<reader.FieldCount;i++)
{
   columns.Add(reader.GetName(i));
}
Comment

PREVIOUS NEXT
Code Example
Sql :: count column of tables psql 
Sql :: mysql timediff 
Sql :: select sequence oracle 
Sql :: oracle create table if not exists 
Sql :: mysql drop database 
Sql :: install sqlite npm 
Sql :: cursor.execute in python sqlite3 
Sql :: recently updated stored procedure in sql server 
Sql :: store select query result in variable sql server 
Sql :: mysql select update same table 
Sql :: not exists mysql 
Sql :: oracle select first result 
Sql :: mysql dump specific tables 
Sql :: how to calculate number of days between two dates excluding weekends in oracle 
Sql :: oracle log files 
Sql :: SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key" 
Sql :: t-sql drop function if exists 
Sql :: drop primary key oracle 
Sql :: postgres select as csv 
Sql :: oracle leftmost characters 
Sql :: oracle percentage 
Sql :: python sqlite data delete 
Sql :: run postgresql dump to csv 
Sql :: json extract 
Sql :: check database size in gb mysql 
Sql :: postgres duplicate key value violates unique constraint already exists 
Sql :: sql injection payload list github 
Sql :: sql server previous month 
Sql :: division by zero postgres 
Sql :: mysql identified by syntax error 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =