c# - MySQL Query To Retrieve Data With Column Names -



c# - MySQL Query To Retrieve Data With Column Names -

i writing tool has retrieve column names of retrieved info set when query applied it.

if you're familiar phpmyadmin, realize sql pane runs query , shows result column names. wonder how hard query be, results in column names , what's programming behind scene? like, analyzes query , find table names , first retrieve column names using query show columns table-name , data?

is there improve way?

updated sorry incomplete information, think must using mysql connector .net , using c#.

your columns part of metadate of datareader or datatable load in c#

from msdn datatable:

private void printcolumnnames(dataset dataset) { // each datatable, print columnname. foreach(datatable table in dataset.tables) { foreach(datacolumn column in table.columns) { console.writeline(column.columnname); } } }

for datareader, see can column names sqldatareader?

c# .net mysql sql

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -