如题,我用
{
            SqlConnection con = new SqlConnection("server=.;database=dxdata;uid=sa;pwd= ");
            string sql = "select * from  表名 where ID = '" + this.textBox1.Text + "'";
            DataSet ds = new DataSet();
            SqlDataAdapter adapter = new SqlDataAdapter(sql, con);
            try
            {
                adapter.Fill(ds, "表名");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    textBox3.Text = ds.Tables[0].Rows[0]["字段名1"].ToString();
                    textBox4.Text = ds.Tables[0].Rows[0]["字段名2"].ToString();
                    comboBox1.字段名3
                   dateTimePicker1字段名4 

               }
                else
                {
                    MessageBox.Show("没有相关记录");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
数据表中的记录都是varchar 如何将 字段名3 的值赋值给combox 将字段名4的值赋给dateTimePicker1呢