J
Julien
Hi !!
I try to collect information from my Excel file into a datagrid but nothing
happens with this code :
================================================================
strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program
Files\concentrator\example\CounterDDE.xls;Extended Properties=Excel 8.0;";
OleDbConnection oConn = new OleDbConnection();
oConn.ConnectionString = strConn;
oConn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM counter_range",
oConn);
DataSet ds = new DataSet();
da.Fill(ds);
dataGrid1.DataSource = ds.Tables[0].DefaultView;
oConn.Close();
===============================================================
what's wrong ? did I forget something ?
What I could not understand is why I can't do a databind() in winforms...
i'm pretty sure that the problem comes from : dataGrid1.DataSource =
ds.Tables[0].DefaultView;
thanks,
Julien
I try to collect information from my Excel file into a datagrid but nothing
happens with this code :
================================================================
strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program
Files\concentrator\example\CounterDDE.xls;Extended Properties=Excel 8.0;";
OleDbConnection oConn = new OleDbConnection();
oConn.ConnectionString = strConn;
oConn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM counter_range",
oConn);
DataSet ds = new DataSet();
da.Fill(ds);
dataGrid1.DataSource = ds.Tables[0].DefaultView;
oConn.Close();
===============================================================
what's wrong ? did I forget something ?
What I could not understand is why I can't do a databind() in winforms...
i'm pretty sure that the problem comes from : dataGrid1.DataSource =
ds.Tables[0].DefaultView;
thanks,
Julien