Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回由指定的列 ID 标识的列的名称。
Public Function GetColumnName(ByVal columnID As Integer) As String
public string GetColumnName(int columnID)
columnID 列的 ID。值必须在 [0,ColumnCount-1] 范围内。
列的名称;如果该列没有名称,则为空值引用(在 Visual Basic 中是 Nothing)。如果该列在 SQL 查询中使用别名,则返回该别名。
ULException 类 发生 SQL 错误。
结果集中并非所有列都有名称,并且并非所有列名都是唯一的。如果没有使用别名,非计算列的名称将以其所属表的名称为前缀。例如,MyTable.ID 是查询 "SELECT ID FROM MyTable" 返回的结果集中仅有的一列的名称。
列 ID 和计数在模式升级过程中可能发生变化。为了正确地标识列,请按名称访问它,或者在模式升级后刷新高速缓存中的 ID 和计数。