ODBC+ASSESS中遇到一个问题?(对数据库增加一个记录后,Clistctrl刷新问题)

crytral 2003-10-17 04:09:52
我在对数据库增加一个记录后,想让它在已经有记录显示的Clistctrl对象中,把刚加入的对象显示出来。
我用的代码如下:
m_set.MoveLast();
int count;
CString math,chinese;
math.Format("%d",m_set.m_mathscore);
chinese.Format("%d",m_set.m_chinesescore);
count=m_liulanlist.GetItemCount();
m_liulanlist.InsertItem(count,m_set.m_name,0);
m_liulanlist.SetItemText(count,1,math);
m_liulanlist.SetItemText(count,2,chinese);
m_liulanlist.SetItemText(count,3,m_set.m_sex);//m_liulanlist是Clistctrl的                         //一个对象。
为什么会出错呢?错在那里呢?
有没有别的办法来解决?
...全文
46 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kuse 2003-10-30
  • 打赏
  • 举报
回复
数据库更新后,有一段迟延时间的,马上m_set.MoveLast();好像没用
我也正在考虑这个问题,如何等刷新后再读数据

关注中。。。
huanyun 2003-10-17
  • 打赏
  • 举报
回复
m_liulanlist.Update()
chendongyong 2003-10-17
  • 打赏
  • 举报
回复
vc
crytral 2003-10-17
  • 打赏
  • 举报
回复
会不会是装VC时,漏装了什么?
stonexl 2003-10-17
  • 打赏
  • 举报
回复
错在那一句上了?
flyelf 2003-10-17
  • 打赏
  • 举报
回复
从代码上看,应该没有问题

4,011

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 数据库
社区管理员
  • 数据库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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