读取数据库填充dataset

string mySqlstring = string.Format("select * from woman where Id='{0}'", woman.Id);
MySqlCommand mySqlCommand = new MySqlCommand(mySqlstring, connServer);
MySqlDataAdapter mySqlDataAdapter = new MySqlDataAdapter(mySqlCommand);
DataSet dataSet = new DataSet();
mySqlDataAdapter.Fill(dataSet);

你可能感兴趣的:(Data)