D
David Young
I hope someone can help. I'm using a SqlDataReader to pull some data from a
Sql 2000 database. Most of the columns are varchar's of varing lengths and
one of the columns is defined as a char(2). Using the datareader I can get
the values of the varchar columns, but the char column returns empty.
Example:
myObj.prop1 = Convert.ToString(dr["VARCHAR_COL_1"]);
myObj.prop2 = Convert.ToString(dr["VARCHAR_COL_2"]);
myObj.prop3 = Convert.ToString(dr["CHAR_COL_1"]);
I know there's a value in the char column on the db, the first two
properties get set, but the third does not. I haven't check to see if it's
null or just an empty string, My property being assigned to is a string.
David
Sql 2000 database. Most of the columns are varchar's of varing lengths and
one of the columns is defined as a char(2). Using the datareader I can get
the values of the varchar columns, but the char column returns empty.
Example:
myObj.prop1 = Convert.ToString(dr["VARCHAR_COL_1"]);
myObj.prop2 = Convert.ToString(dr["VARCHAR_COL_2"]);
myObj.prop3 = Convert.ToString(dr["CHAR_COL_1"]);
I know there's a value in the char column on the db, the first two
properties get set, but the third does not. I haven't check to see if it's
null or just an empty string, My property being assigned to is a string.
David