i tried lot of times but it is not working please help me.
you send your sample code base on that i put my code but it error shows as follows;
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
.
Runmode screen as follows;
Code combobox view(Button)
in the combobox all the code details are displayed in the combo box.that code is working fine no problem.
i have one button Called View Button
what i need now is when i click the View Button all the details from the database to be retrieved and displayed into the datagridview.
IN Global function i written the below code
public OleDbConnection OleDbCon = null;
private string Accessconncetionstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= E:\\Projects\\Faculty Schedule\\Faculty Schedule\\Data\\HIMTTESTing.mdb;";
private OleDbCommand OledbCmd;
private OleDbDataReader OledbDr;
Bindaccessconn function code as follows;
public void BindAccessConn()
{
OleDbCon = new OleDbConnection();
OleDbCon.ConnectionString = Accessconncetionstring;
OleDbCon.Open();
}
View Button code as follows
<private void="" eventargs="" mode="hold" /> {
System.Data.OleDb.OleDbConnection OleDbCon = new System.Data.OleDb.OleDbConnection();
GFun.BindAccessConn();
sql = "select CONVERT(varchar(11), [Sch_Date], 106) AS schDate, [Session],[Faculty_Code] from Tb_SCh_TIme_Table where Course = '" + cb_Course_Name.Text.ToString().Trim() + "' order by Date,session";
OleDbDataAdapter da = new OleDbDataAdapter(sql, GFun.OleDbCon);
DataTable dt = new DataTable();
da.Fill(dt);
DGV_Course_report.DataSource = dt;
}
when i run and click the view button error shows as follows;
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
what is the problem in my view button code.
kindly please help me. i tried lot of times but in datagridview records not displayed from the database.
help me.
when i debug and check in the below line,
DataTable dt = new DataTable();
dt is null.why dt value is null.
i tried lot of times but it is not working.
Rgds & Thanks,
Narasiman.