L
labrynth
I have recently started coding in .net technologies. Here is what I
want to do -
I have a dataset that consists of all the rows and columns of a table
(say emp).
I also have a datagrid control on my windows form.
I would like to extract all the row values for a particular field (say
empname) from the dataset, i.e without connecting to the database and
display it in my datagrid.
Can someone tell me how to do this -
here is the code -
OleDbDataConnection cn = new OleDbDataConnection(connectionstring);
OleDbDataAdapter da = new OleDbDataAdapter("select * from emp" , cn);
DataSet ds = new DataSet();
da.Fill(ds, "e");
directly use as a datasource for my datagrid.
Thanks,
Lb
want to do -
I have a dataset that consists of all the rows and columns of a table
(say emp).
I also have a datagrid control on my windows form.
I would like to extract all the row values for a particular field (say
empname) from the dataset, i.e without connecting to the database and
display it in my datagrid.
Can someone tell me how to do this -
here is the code -
OleDbDataConnection cn = new OleDbDataConnection(connectionstring);
OleDbDataAdapter da = new OleDbDataAdapter("select * from emp" , cn);
DataSet ds = new DataSet();
da.Fill(ds, "e");
either a seperate table, or view, or an array - something that I canFrom ds, I would like all the row values of the column/field empname in
directly use as a datasource for my datagrid.
Thanks,
Lb