I would really like to see this following method in place of existing method in future versions of mygeneration.doodads project. (the version i am using is v1.1.5.1)
NOTE: in else clause there is another if clause because if i use LoadbyPrimaryKey or LoadAll method tol oad data from a firebird database table then the data returned in a Blob field is byte[] otherwise if i use Query.Load the blob field returns string. And there is no check for byte in GetString() method. the existing method just returns error when i use LoadbyPrimaryKey or LoadAll methods and try to load blob in a string but with the following change it works fine.
protected string Getstring(string columnName)
{
if(_dataRow.IsNull(columnName))
return String.Empty;
else
if ( _dataRow[columnName] is byte[])
return System.Text.Encoding.UTF7.GetString((byte[])_dataRow[columnName]);
else
return (string)_dataRow[columnName];
}
I hope that u guys will change this in next version of doodads.
cheers,
Harpreet Singh
