我想将整数值存储在标签中并传递给另一个表单。但价值获得通过,但它通过system.data.dataset
。以下是我的代码。请帮我解决一下这个。从数据库中获取数据并传递给另一个表单
con.Open();
SqlCommand cmd1 = new SqlCommand("select balance from customer where namee='" + textBox1.Text + "'", con);
SqlDataAdapter adapter = new SqlDataAdapter(cmd1);
DataSet ds = new DataSet();
adapter.Fill(ds, "loki");
label4.Text = ds.ToString();
options frm = new options(label4.Text);
frm.Show();
con.Close();
有什么问题为int? – 2012-07-26 08:06:36
将TextBox的*修饰符*设置为* public *并以第二种形式写入* code *。 – adatapost 2012-07-26 08:07:43
你已经分配了System.Data.Dataset标签并将其传递给另一个表单 – 2012-07-26 08:07:59