Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
获取列值的字符串长度。
public virtual size_t GetStringLength(ul_column_num cid)
cid 从 1 开始的列序号。
用于保存由 GetString 方法之一返回的字符串所需的字节数或字符数(不包括空终止符)。
以下示例说明如何获取列的字符串长度:
len = result_set->GetStringLength( cid ); dst = new char[ len + 1 ]; result_set->GetString( cid, dst, len + 1 );
对于宽字符,用法如下:
len = result_set->GetStringLength( cid ); dst = new ul_wchar[ len + 1 ]; result_set->GetString( cid, dst, len + 1 );