哪里错了 哪里报错啊?strDSQL,new SqlConnection(DataConfiguration.ConnectionString)还可以这样写啊,有学一招,呵呵 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你的deleteCommand 是字段还是局部变量?看你有return deleteCommand的返回值,应该是局部变量吧,哪你的deleteCommand 变量在哪定义的? dsCommand = new SqlDataAdapter(); public bool DeleteCourseRate(cCourseRateData oCourseRateData) { if (dsCommand == null) { throw new System.Exception("数据适配器没有初始化"); } dsCommand.DeleteCommand = GetDeleteCommand(); dsCommand.Update(oCourseRateData,cCourseRateData.TableName); if (oCourseRateData.HasErrors) { oCourseRateData.Tables[cCourseRateData.TableName].GetErrors()[0].ClearErrors(); return false; } else { oCourseRateData.AcceptChanges(); return true; } }谢谢 使用RadUpload控件在本地有进度条,在服务器上无显示.而且上传不了大文件! C#如何将其它指定的程序(非本C#程序)在任务栏里不显示. Visual Studio 2005中添加一个Text File文件的问题 关于pictureBox的绑定 vs2005调用外部的水晶报表 一个简单的正则式问题? 如何更改bin文件夹中dll文件的调用 一个有趣的Icon问题 《思归》有急事请教你,请你帮忙! Help!!!!!!!! VS中文本控件的属性里面的DataBindings属性是怎么用的? 访问器的问题
public bool DeleteCourseRate(cCourseRateData oCourseRateData)
{
if (dsCommand == null)
{
throw new System.Exception("数据适配器没有初始化");
}
dsCommand.DeleteCommand = GetDeleteCommand();
dsCommand.Update(oCourseRateData,cCourseRateData.TableName); if (oCourseRateData.HasErrors)
{
oCourseRateData.Tables[cCourseRateData.TableName].GetErrors()[0].ClearErrors();
return false;
}
else
{
oCourseRateData.AcceptChanges();
return true;
}
}谢谢