adBookmarkFirst问题

uuq 2005-06-05 11:00:51
用vc6编写一个读取mysql数据库。是通过odbc来读取。
前面能用list控件正常显示出来数据,
当我点击一行时。我想把数据结果移到选取那行数据时
程序说Runtime Error
我查发现是
theApp.pRecordSet->Move(m_nCurrentSel,_variant_t((long)adBookmarkFirst));
这句出问题
用theApp.pRecordSet->MoveLast();或MoveFirst
又没有问题
m_nCurrentSel是我选择list中的一行序号。
各位老大帮看看是什么问题。
...全文
98 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
uuq 2005-06-09
  • 打赏
  • 举报
回复
各位高手,是不是mysql不支持这个adBookmarkFirst
uuq 2005-06-09
  • 打赏
  • 举报
回复
各位高手,是不是mysql不支持这个adBookmarkFirst
uuq 2005-06-06
  • 打赏
  • 举报
回复
那是不是说我这个
adBookmarkFirst
没有指定值。
我程序一到这里就异常。

oyljerry 2005-06-06
  • 打赏
  • 举报
回复
书签位置
kingzai 2005-06-05
  • 打赏
  • 举报
回复
recordset.Move(NumRecords, Start)

Parameters
NumRecords
A signed Long expression that specifies the number of records that the current record position moves.
Start
Optional. A String value or Variant that evaluates to a bookmark. You can also use a BookmarkEnum value.

BookmarkEnum
Constant Value Description
adBookmarkCurrent 0 Starts at the current record.
adBookmarkFirst 1 Starts at the first record.
adBookmarkLast 2 Starts at the last record.

Example:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdaexamples_vc03_8.asp

4,011

社区成员

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

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