hi,
this code is work well in vs2002 C# but not in vs2005 express edition. Any have idea about the issue here? Or someone can give me in detail on how to put data to a datagrid in vs2005?
thanks,Code:dataset ds = new dataset(); MySqlDataAdapter myadapter = new MySqlDataAdapter(); myadapter.SelectCommand = new MySqlCommand(); myadapter.SelectCommand.Connection = stsqcon.getConnection(); myadapter.SelectCommand.CommandText = " Select * from partmain a inner join appmodel b on a.p_code=b.p_code inner join vehicle c on c.veh_code = b.veh_code where b.veh_code =?veh_code order by p_desc"; myadapter.SelectCommand.Parameters.Add("?veh_code",MySqlDbType.Int32 ,4); myadapter.SelectCommand.Parameters["?veh_code"].Value = lv1.SelectedItems[0].SubItems[1].Text; myadapter.Fill(ds,"partmain"); dataGrid1.DataSource = ds;
Popskie


Reply With Quote
