Thanks Dong
There are many variants of Ole connections and datasets, dataadapters etc.
But I am actually looking for a more general solution trying to resolve the
issue of the dgHH not being in the same context.
For example, my datagridView is called dgHH. When i try to place my oleDB
code in a separate class, I am no longer able to refer to that - and I get
the context message.
I am looking for some advice on how to get around that issue.
thanks
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> if you use datagrid why dont you use OleDataAdapter
> then fill to DataSet from your dataapder
> then set datagrid.datasource=dataset
>
> for example
>
> OleDbDataAdapter da=new OleDbadapter(" your select sql", your
> connection);
> DataSet ds=new DataSet()// it will store your data, not need " reader";
> da.fill(ds,"tablename");
> datagrid.datasource=ds;
>
> DongMT
> (E-Mail Removed)
>