How to Convert System.Guid to System.String in code?
Hi,
all I want is read value of the Guid type column in code and convert it to String, something like this:
String s_guid = Convert.ToString((Guid)Report.GetColumnValue("SQL_Move.acDiscountCouponGUID"));
But throws me conversion exception! Why??? How to read Guid column value??
Best Regards,
Matja??
all I want is read value of the Guid type column in code and convert it to String, something like this:
String s_guid = Convert.ToString((Guid)Report.GetColumnValue("SQL_Move.acDiscountCouponGUID"));
But throws me conversion exception! Why??? How to read Guid column value??
Best Regards,
Matja??
Comments
Solved:
private void dataDiscountCoupon_BeforePrint(object sender, EventArgs e)
{
Guid my_guid = Guid.Empty;
try
{
my_guid = (Guid)Report.GetColumnValue("SQL_Move.acDiscountCouponGUID");
}
catch (Exception ex)
{}
subDiscountCoupon.Visible = my_guid != Guid.Empty;
}