Dim cmd As New SQLCommand Dim dt As DataTable Dim cmb As WinForm.ComboBox cmd.CommandText = "Select s_ID,u_Code,u_Name from dbo.StorHouse where s_Syb=1 and u_Name not in ('***')" cmd.C dt = cmd.ExecuteReader() Dim dr As DataRow dr = dt.AddNew() dr("s_ID") = "0" dr("u_Code") = "ALL" dr("u_Name") = "查询所有库房" cmb = e.Form.Controls("ComboBox1") cmb.ComboList= dt.GetComboListString("u_Name")
2楼
migold 发表于:2009/8/19 10:54:00
以前是不会出错的,这次更新后就出错
3楼
yangming 发表于:2009/8/19 10:54:00
有什么提示?
4楼
migold 发表于:2009/8/19 10:56:00
Dim cmd As New SQLCommand Dim dt As DataTable Dim cmb As WinForm.ComboBox cmd.CommandText = "Select s_ID,u_Code,u_Name from dbo.StorHouse where s_Syb=1 and u_Name not in ('***')" cmd.C dt = cmd.ExecuteReader() Dim dr As DataRow dr = dt.AddNew() dr("s_ID") = "0" dr("u_Code") = "ALL" dr("u_Name") = "查询所有库房" cmb = e.Form.Controls("ComboBox1") cmb.ComboList= dt.GetComboListString("u_Name")