求教!!在access数据库中select一个字段,然后显示在datagridview上,怎么写啊?
											我是新手,在练习,这个不会啊 。求指教,										
					
	
				
											这个和数据库的显示是一样的吧!
举个例子
连接数据库的数据库connection="Data Source=wealthMIS.mdb;Jet OLEDB:Engine Type=5;Provider=Microsoft.Jet.OLEDB.4.0;"
        private void btAdd_Click(object sender, System.EventArgs e)
        {
            if (textIn.Text.Trim()=="")
                MessageBox.Show("请填写项目名称","提示");
            else
            {
                if (oleConnection1==null)
                    oleConnection1 = MainForm.getConnection();
                string sql="insert into inItem(inItem) values ('"+textIn.Text.Trim()+"')";
                OleDbCommand cmd = new OleDbCommand("",oleConnection1);
                 = sql;
                try
                {
                    cmd.ExecuteNonQuery();
                    MessageBox.Show("添加成功","提示");
                    this.textIn.Text="";
                    MainForm.FillDataGrid(strSql1,dataName1,dataGrid1);
                }
                catch(System.Exception E)
                {
                    Console.WriteLine(E.ToString());
                }
                finally
                {
                    cmd.Dispose();
                }
            }
        }
希望可以帮上你吧										
					
	
	
	
			


											
	    

	


