public static string mWriteRequired(OracleDataReader rd)
{
StringBuilder sb = new StringBuilder();
//For field Names
for(int i = 0 ;i< rd.FieldCount;i++)
{
if( i < (rd.FieldCount - 1) )
{
sb.Append("\t" + rd.GetName(i) + "\t" + ",");
}
else
{
sb.Append("\t" + rd.GetName(i) + "\t" + "\n");
}
}
//For field Values
while( rd.Read())
{
for(int i = 0 ;i< rd.FieldCount;i++)
{
if( i < (rd.FieldCount - 1) )
{
sb.Append("\t" + rd.GetValue(i) + "\t" + ",");
}
else
{
sb.Append("\t" + rd.GetValue(i) + "\t" + "\n");
}
}
}
rd.Close();
return sb.ToString();
}
Difference between Rollup and Cube
14 years ago
No comments:
Post a Comment