急急急.在线等呀 我用C#做了一个程序,在将其它系统的数据倒入之前此程序所有的功能都能正常使用,但是将10000来条记录倒进去后,我的这个程序只能增加,删除,不能修改了,程序无报错,运行都正常.(这里提一下,我将数据用的表只有其中两张表,其它的表也都是空表,现在都出现了不能修改的现象,不知为什么),清理掉日志也不行. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你的修改方式是什么?是直接SQL语句,还是用绑定方式修改?数据库是什么?数据库中有什么特殊的限制? 我用的是sql2000数据库数据库中没有特殊的限制. 类代码: private void UpdateRecord() { try { // myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Id"] = base.Info_Id; myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Title"] = base.Info_Title; myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Body"] = base.Info_Body; if(base.Info_Date!="") { myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Date"]=Convert.ToDateTime(base.Info_Date); } if(base.End_Date!="") { myDataSet.Tables["Info_List"].Rows[iCurrentRow]["End_Date"]=Convert.ToDateTime(base.End_Date); } myDataSet.Tables["Info_List"].Rows[iCurrentRow]["uid"] = base.uid; myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Class"] = base.Info_Class; mySqlDataAdapter.Update(myDataSet,"Info_List"); } catch { } } public void Save() { if (bIsDirty==true) { UpdateRecord(); bIsDirty=false; } }cs文件代码CInfo_Lists m_Info_List=new CInfo_Lists();m_Info_List.bIsDirty=true;m_Info_List.Save (); 去掉try{... ...}catch { }就会报错了. 你这个异常处理什么错都会忽略的. 提示如下:对于不返回任何健列信息Select Command值不支持UPdateCommand 的动态 SQL 生成 http://topic.csdn.net/t/20050112/14/3719690.html c#怎么只启动一个例程?以及启动参数传递问题 求解:dataGridView 当编辑单元格,光标离开时修改到数据源 存储一个字符串到数据库,结果数据库中对应字段为一串问号,“????????”.代码如下。 硬盘重新分区,但是没有格式化,数据能够恢复吗? 我在制作C#安装程序的时候,报错,看什么问题 控件如何截获Form的Click事件? GridView Footer 取消字体加粗 急!有关于SQL语句问题 怒喷CSDN 在c#的异常处理中,社么情况下要用checked,是不是只用于overflowexcepton API发送方向键出现问题,请高手来帮忙 求助一个winform中超连接的问题
数据库是什么?
数据库中有什么特殊的限制?
数据库中没有特殊的限制.
{
try
{
// myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Id"] = base.Info_Id;
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Title"] = base.Info_Title;
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Body"] = base.Info_Body;
if(base.Info_Date!="")
{
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Date"]=Convert.ToDateTime(base.Info_Date);
}
if(base.End_Date!="")
{
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["End_Date"]=Convert.ToDateTime(base.End_Date);
}
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["uid"] = base.uid;
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Class"] = base.Info_Class;
mySqlDataAdapter.Update(myDataSet,"Info_List");
} catch
{
}
}
public void Save()
{
if (bIsDirty==true)
{
UpdateRecord();
bIsDirty=false;
}
}
cs文件代码CInfo_Lists m_Info_List=new CInfo_Lists();
m_Info_List.bIsDirty=true;
m_Info_List.Save ();
try
{
... ...
}
catch
{
}
就会报错了. 你这个异常处理什么错都会忽略的.