ODBC驱动程序11的SQL Server和SQLGetData限制 [英] ODBC Driver 11 for SQL Server and SQLGetData limitations

查看:168
本文介绍了ODBC驱动程序11的SQL Server和SQLGetData限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQLGetData函数参考说明了API的以下一般限制:

The SQLGetData Function reference explains the following general limitation of the API:

如果驱动程序不支持SQLGetData的扩展,则该函数 只能返回数字大于的未绑定列的数据 最后绑定列的值.此外,在一行数据中, 每次调用SQLGetData时Col_or_Param_Num参数的值必须 大于或等于 以前的电话;也就是说,必须在递增列中检索数据 编号顺序.

If the driver does not support extensions to SQLGetData, the function can return data only for unbound columns with a number greater than that of the last bound column. Furthermore, within a row of data, the value of the Col_or_Param_Num argument in each call to SQLGetData must be greater than or equal to the value of Col_or_Param_Num in the previous call; that is, data must be retrieved in increasing column number order.

SQLGetData上的 ODBC API实现详细信息文章添加了SQL Server本机客户端驱动程序特定的信息:

The ODBC API implementation details article on the SQLGetData adds information specific to the SQL Server Native Client driver:

SQL Server Native Client ODBC驱动程序不支持使用 SQLGetData以随机列顺序检索数据.全部未绑定 使用SQLGetData处理的列必须具有更高的列序号 比结果集中的绑定列要多.

The SQL Server Native Client ODBC driver does not support using SQLGetData to retrieve data in random column order. All unbound columns processed with SQLGetData must have higher column ordinals than the bound columns in the result set.

此列排序限制是否适用于新的和推荐的 SQL Server的Microsoft ODBC驱动程序?

Does this column ordering limitation apply to the new and recommended Microsoft ODBC Driver for SQL Server?

当前 用于SQL Server版本的ODBC驱动程序11和即将发布的版本用于SQL Server的ODBC驱动程序13(预览版)?

Is there any difference in this behaviour between the current ODBC Driver 11 for SQL Server version and the upcoming version ODBC Driver 13 (Preview) for SQL Server?

推荐答案

所有当前的Microsoft SQL Server驱动程序都具有列顺序限制.

All current Microsoft SQL Server drivers has column ordering limitations.

您可以通过调用SQLGetInfo ODBC函数,从代码中测试驱动程序的功能.

You can test the drivers capabilities from code by calling the SQLGetInfo ODBC function.

用于SQL Server的ODBC驱动程序17 返回以下信息:

SQL_GETDATA_EXTENSIONS:
        SQL_GD_ANY_COLUMN false
        SQL_GD_ANY_ORDER false

用于SQL Server的ODBC驱动程序13 返回以下内容:

SQL_GETDATA_EXTENSIONS:
        SQL_GD_ANY_COLUMN false
        SQL_GD_ANY_ORDER false

SQL Server Native Client 10.0 返回以下内容:

SQL_GETDATA_EXTENSIONS:
        SQL_GD_ANY_COLUMN false
        SQL_GD_ANY_ORDER false

这篇关于ODBC驱动程序11的SQL Server和SQLGetData限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆