Previous Thread

8/9/2006 3:40:08 AM    oledb varchar length
Hello, 
 
i read rows from table using: 
 
CTable<CDynamicAccessor> table; 
 
...... 
 
table.GetStatus(l+1,&status); 
 
table.GetColumnType(l+1,&type); 
 
table.GetLength(l+1,&length); 
 
table.GetValue(l+1); 
 
For varchar data type variable "length" contains maximal size of 
 
column. How can i get real length of varchar string? 
 
Besides, i can't use GetColumnInfo(...), because it returns 
 
DBCOLUMNINFO structure and this structer either contains ulColumnSize 
 
member with maximal length of column. But i really need actual length 
 
of varchar string. 
 
Thanks in advance.