DataTable myda = new dataatable ();
Datacolumn DCNAME = myda.columns.add ("f2"); DCNAME.DATATYPE = type.gettype ("system.string"); DCNAME = myda.columns.add ("f7"); dcname.DataType = type.gettype "System.string"); DCNAME = myda.columns.add ("f9"); DCNAME.DATATYPE = type.gettype ("system.string");
DataRow DR; for (int i = 0; i MySqlAdapter.SelectCommand = myCm; this.MySqlAdapter.SelectCommand.CommandText = ". Select * from tempdb # abc, lwj_view where tempdb # abc.f2 = lwj_view.productid and lwj_view.priceid = 'RMJ'."; // MySqlAdapter.SelectCommand =; DataSet DS2 = new dataset (); this.mysqladapter.Fill (DS2); this.label1.text = "New Table Content"; this.mygrid.DataSource = DS2.Tables [0]; this.savefileDialog1.filter = "XML files (* .xml) | * .xml"; this.savefiledialog1.filterIndex = 1; if (SaveFileDialog1.ShowDialog () == DialogResult.ok) {if (this.savefiledialog1.filename! = ") DS2. Writexml (this.savefiledialog1.filename); MessageBox.show ("Export Data Success!");