gpt4 book ai didi

sql-server - 什么是数据库中的书签列?

转载 作者:搜寻专家 更新时间:2023-10-30 19:51:54 26 4
gpt4 key购买 nike

MSDN documentation对于 SqlDataReader.GetSchemaTable 方法,返回的 ColumnOrdinal 声明如下:

"The ordinal of the column. This is zero for the bookmark column of the row, if any. Other columns are numbered starting with one. This column cannot contain a null value."

但是书签栏是什么意思呢?它像主键吗?

最后,我想知道的是 ColumnOrdinal 是否总是从零开始,或者是否存在它不会从零开始的情况。

最佳答案

来自 Bookmarks, MSDN :

Bookmarks let consumers quickly return to a row. With bookmarks, consumers can access rows randomly based on the bookmark value. The bookmark column is column 0 in the rowset. The consumer sets the dwFlag field value of the binding structure to DBCOLUMNSINFO_ISBOOKMARK to indicate that the column is used as a bookmark. The consumer also sets the rowset property DBPROP_BOOKMARKS to VARIANT_TRUE. This lets column 0 be present in the rowset. The IRowsetLocate::GetRowsAt method is then used to fetch rows, starting with the row specified as an offset from a bookmark.

关于sql-server - 什么是数据库中的书签列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6442833/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com