怎样才能让各字段分别在Textbox内显示?
如果是查询到多条记录该如何显示?
Dim cmd As New SqlCommand("select 出生年月,性别,籍贯,婚姻状况,民族,政治面貌,学历,专业,毕业日期,职务,外语水平,岗位工种,行政级别,外语语种,联系电话,所属部门,户口,家庭住址,户籍住址,身份证号码,邮编,在职情况,入职日期,合同日期,参加工作,退休日期,手机,特长,用工形式,离职日期,合同到期,转正日期,员工档案号,养老手册号,公积金账号,毕业院校,职称,电脑水平,信用卡号,发卡银行,工龄,电子邮件,备注 from 员工信息 where 员工编号='" & TextBox1.Text & "'", constr)
Dim rd As SqlDataReader
rd = cmd.ExecuteReader(CommandBehavior.CloseConnection)
While rd.Read
DateTimePicker1.Text = rd.Item(0)
ComboBox1.Text = rd.Item(1)
ComboBox8.Text = rd.Item(2)
ComboBox9.Text = rd.Item(3)
ComboBox10.Text = rd.Item(4)
ComboBox2.Text = rd.Item(5)
ComboBox3.Text = rd.Item(6)
TextBox9.Text = rd.Item(7)
DateTimePicker2.Text = rd.Item(8)
ComboBox11.Text = rd.Item(9)
ComboBox12.Text = rd.Item(10)
ComboBox4.Text = rd.Item(11)
ComboBox5.Text = rd.Item(12)
ComboBox6.Text = rd.Item(13)
TextBox2.Text = rd.Item(14)
ComboBox14.Text = rd.Item(15)
ComboBox15.Text = rd.Item(16)
TextBox20.Text = rd.Item(17)
TextBox21.Text = rd.Item(18)
TextBox16.Text = rd.Item(19)
TextBox3.Text = rd.Item(20)
ComboBox7.Text = rd.Item(21)
DateTimePicker3.Text = rd.Item(22)
DateTimePicker5.Text = rd.Item(23)
DateTimePicker7.Text = rd.Item(24)
DateTimePicker9.Text = rd.Item(25)
TextBox10.Text = rd.Item(26)
TextBox11.Text = rd.Item(27)
ComboBox13.Text = rd.Item(28)
DateTimePicker4.Text = rd.Item(29)
DateTimePicker6.Text = rd.Item(30)
DateTimePicker8.Text = rd.Item(31)
TextBox15.Text = rd.Item(32)
TextBox17.Text = rd.Item(33)
TextBox18.Text = rd.Item(34)
TextBox19.Text = rd.Item(35)
ComboBox16.Text = rd.Item(36)
ComboBox17.Text = rd.Item(37)
TextBox22.Text = rd.Item(38)
ComboBox18.Text = rd.Item(39)
TextBox23.Text = rd.Item(40)
TextBox24.Text = rd.Item(41)
TextBox25.Text = rd.Item(42)
End While
constr.Close()
第一个问题的