什么意思?代码中有四句 MessageBox.Show("成功");
解决方案 »
- C# LastIndexOf 遇到的问题
- System.Net.WebException: 远程服务器返回错误: (405) 不允许的方法
- 查看别的命空间的代码?
- sql汇总语句
- 求正则表达式替换方法
- 初说C#,刚做了一个asp.net web 的应用程序,在原目录下是可以打开的,我现在想这些文件拿到另外一个目录下,已经配置好ISS,在IE打开都
- 急!小白又有问题了
- 请问如何将可序列化对象转为XmlElement对象?
- 关于WINDOW窗体
- C# dataGridView 读取Excel 表格内容 报错:对象不能从DBNUll转换为其他类型
- C# net2.0 中的web控件gridview 的事件RowDataBound据然在事件RowDeleting之后执行,这是为什么啊!
- 高分问一道题,请大家都来看一下
换成 radioButton.SelectedItems.Text呢
{
//tion = new SqlConnection("server=.;database=ddt;uid=sa;pwd=");
sql = "select * from name where name='"+ (sender as RadioButton).Text+"'"; try
{
tion.Open();
and = new SqlCommand(sql, tion);
rd = and.ExecuteReader();
if (rd.Read())
{
MessageBox.Show("成功");
sum = sum + 25;
}
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}
finally {
tion.Close();
rd.Close();
and.Dispose();
}
}