c#数据库小问题 不解!

cwlcwr 2005-03-11 04:45:07
dr = MyComm.ExecuteReader();
dr.Read();
con.Text=dr["con"].ToString();
atime.Text=dr["atime"].ToString();
neirong.Text=dr["neirong"].ToString();
dr.Close();
string strSel1 = "UPDATE ari SET achick=achick+15 WHERE id=27"
OleDbCommand myCommand2= new OleDbCommand(strSel1,myConnection);
myCommand2.Connection.Open();
myCommand2.ExecuteNonQuery();
myCommand2.Connection.Close();
读 正常
设置加15 打开字段 还是默认的0 该字段为整型
为什么?
...全文
111 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
cwlcwr 2005-03-11
  • 打赏
  • 举报
回复
access数据库 哪里来的触发器

我也郁闷了!
cwlcwr 2005-03-11
  • 打赏
  • 举报
回复
string strSel1 = "UPDATE ari SET achick=achick+15 WHERE id=27"

achick默认为0

???
cpio 2005-03-11
  • 打赏
  • 举报
回复
是不是有什么触发器更改了它的值

反正这个SQl肯定是会把0加到15的

你查询是不是不是查询的ID为27的?
Night_Elf 2005-03-11
  • 打赏
  • 举报
回复
achick为null?
magma 2005-03-11
  • 打赏
  • 举报
回复
除了少了个分号,其他好象没错
darksinada 2005-03-11
  • 打赏
  • 举报
回复
大哥,你的加15是写在引号里面的啊,唬谁啊?

111,096

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧