用vc6编写一个读取mysql数据库。是通过odbc来读取。
前面能用list控件正常显示出来数据,
当我点击一行时。我想把数据结果移到选取那行数据时
程序说Runtime Error
我查发现是
theApp.pRecordSet->Move(m_nCurrentSel,_variant_t((long)adBookFirst));
这句出问题
用theApp.pRecordSet->MoveLast();或MoveFirst
又没有问题
m_nCurrentSel是我选择list中的一行序号。
各位老大帮看看是什么问题。

解决方案 »

  1.   

    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 book. You can also use a BookEnum value.BookEnum
    Constant          Value Description 
    adBookCurrent 0     Starts at the current record. 
    adBookFirst   1     Starts at the first record. 
    adBookLast    2     Starts at the last record. Example:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdaexamples_vc03_8.asp
      

  2.   

    那是不是说我这个
    adBookFirst
    没有指定值。
    我程序一到这里就异常。
      

  3.   

    各位高手,是不是mysql不支持这个adBookFirst
      

  4.   

    各位高手,是不是mysql不支持这个adBookFirst