`
chenqi210
  • 浏览: 78927 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

cautions of SQLGetData

    博客分类:
  • ODBC
 
阅读更多
http://msdn.microsoft.com/en-us/library/ms715441.aspx 写道
There are two exceptions to these restrictions and a driver's ability to relax them.
First, SQLGetData should never be called for a forward-only cursor when the rowset size is greater than 1.

Second, if a driver supports bookmarks, it must always support the ability to call SQLGetData for column 0, even if it does not allow applications to call SQLGetData for other columns before the last bound column. (When an application is working with an ODBC 2.x driver, SQLGetData will successfully return a bookmark when called with Col_or_Param_Num equal to 0 after a call to SQLFetch, because SQLFetch is mapped by the ODBC 3.x Driver Manager to SQLExtendedFetch with a FetchOrientation of SQL_FETCH_NEXT, and SQLGetData with a Col_or_Param_Num of 0 is mapped by the ODBC 3.x Driver Manager to SQLGetStmtOption with an fOption of SQL_GET_BOOKMARK.)

 

 

非常值得注意的 第一点:游标为block cursor类型时,决不要去调用SQLGetData.

而且在这种类型的游标时,SQLSetPos也是不可用的

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics