M
msnews
Hi All,
I have the following code
----------------------------------------------------
Business.Product pdt = new Business.Product();
SqlDataReader product = pdt.GetProductDeals(134);
StringBuilder maker = new StringBuilder();
while (product.Read())
{
maker.append ("formatting text" + product.GetValue(8).ToString());
maker.append ("formatting text" + product.GetValue(3).ToString());
maker.append ("formatting text" + product.GetValue(12).ToString());
}
----------------------------------------------------
In the above code, I am using index value to get the database column value.
It's causing lot of confusion as I have around 45 fields coming from
database. Is it possible to use the DB Column name instead of index value.
Please help.
Thanks in Advance.
I have the following code
----------------------------------------------------
Business.Product pdt = new Business.Product();
SqlDataReader product = pdt.GetProductDeals(134);
StringBuilder maker = new StringBuilder();
while (product.Read())
{
maker.append ("formatting text" + product.GetValue(8).ToString());
maker.append ("formatting text" + product.GetValue(3).ToString());
maker.append ("formatting text" + product.GetValue(12).ToString());
}
----------------------------------------------------
In the above code, I am using index value to get the database column value.
It's causing lot of confusion as I have around 45 fields coming from
database. Is it possible to use the DB Column name instead of index value.
Please help.
Thanks in Advance.