數據庫連接例子——以前看到的都太複雜
this.dataSet=new System.Data.DataSet();string connStr="Provider=MSDAORA.1;User ID=WMS;Data Source=ORCL;Password=wms";
System.Data.OleDb.OleDbConnection Connection=new System.Data.OleDb.OleDbConnection(connStr);
System.Data.OleDb.OleDbDataAdapter ap=new System.Data.OleDb.OleDbDataAdapter("select * from im_inventory",Connection);
ap.Fill(this.dataSet,"im_inventory");
this.dataGrid1.SetDataBinding(this.dataSet,"im_inventory");