Ado error-Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.

  • Thread starter Thread starter VickyCool4U
  • Start date Start date
V

VickyCool4U

Guest
In my VS 2010 Professional edition, using ADO class


I include the following:-

#import "C:\\Program Files\\Common Files\\System\\ado\\msado60.tlb" no_namespace rename( "EOF", "adoEOF" )

I used the following fucntion:-

m_pRecSet->move(pos); where pos is long variable.

As soon as control hit the move function , the above error reproduced.

If I replace the line

#import "C:\\Program Files\\Common Files\\System\\ado\\msado60.tlb" no_namespace rename( "EOF", "adoEOF" )


to


#import <C:\Program Files\Common Files\System\ado\msado15.dll> no_namespace rename ("EOF", "adoEOF")


The problem is resolved, so it look like wrong calling convention with move function.

I found the difference in function declaration of move as follows:-


msado.15:- inline HRESULT Recordset15::Move ( long NumRecords, const _variant_t & Start )

msado.60:- inline HRESULT Recordset15::Move ( ADO_LONGPTR NumRecords, const _variant_t & Start )

Can anybody suggest me the right way to call the move function under msado.60?


Thanks,

Vicky

Continue reading...
 
Back
Top