有关于C#中用户代码未处理 SqlException的问题
部分源程序stringtxtconn="database=courseselect;uid=sa;pwd=111111";conn=newSqlConnection(tx...
部分源程序string txtconn = "database=courseselect;uid=sa;pwd=111111";
conn = new SqlConnection(txtconn);
string s = "select sno 学号,sname 姓名,ssex 性别,sage 年龄,sdept 所在系 from student;";
da = new SqlDataAdapter(s, conn);
ds = new DataSet();
da.Fill(ds, "student");
bs1 = new BindingSource();
bs1.DataSource = ds;
bs1.DataMember = "student";
dataGridView1.DataSource = bs1; 展开
conn = new SqlConnection(txtconn);
string s = "select sno 学号,sname 姓名,ssex 性别,sage 年龄,sdept 所在系 from student;";
da = new SqlDataAdapter(s, conn);
ds = new DataSet();
da.Fill(ds, "student");
bs1 = new BindingSource();
bs1.DataSource = ds;
bs1.DataMember = "student";
dataGridView1.DataSource = bs1; 展开
3个回答
展开全部
wndcls.cbClsExtra=0;
wndcls.cbWndExtra=0;
wndcls.hbrBackground=(HBRUSH)GetStockObject(BLACK_BRUSH);
wndcls.hCursor=LoadCursor(NULL,IDC_HAND);
wndcls.hIcon=LoadIcon(NULL,IDI_ERROR);
wndcls.hInstance=AfxGetInstanceHandle();
wndcls.lpfnWndProc=WinMyWndProc;
wndcls.lpszClassName="模拟Combox窗口";
wndcls.lpszMenuName=NULL;
wndcls.style=CS_HREDRAW|CS_VREDRAW;
RegisterClass(&wndcls);
wndcls.cbWndExtra=0;
wndcls.hbrBackground=(HBRUSH)GetStockObject(BLACK_BRUSH);
wndcls.hCursor=LoadCursor(NULL,IDC_HAND);
wndcls.hIcon=LoadIcon(NULL,IDI_ERROR);
wndcls.hInstance=AfxGetInstanceHandle();
wndcls.lpfnWndProc=WinMyWndProc;
wndcls.lpszClassName="模拟Combox窗口";
wndcls.lpszMenuName=NULL;
wndcls.style=CS_HREDRAW|CS_VREDRAW;
RegisterClass(&wndcls);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询