c# - Convert.ToString returns `System.Byte[]` and not the actual data as GROUP_CONCAT returns BLOB -


i have 1 method calling mysql procedure. below part of procedure:

select ar.alert_id alertid,         ar.rule_id ruleid,         ar.name rulename,         ar.rule_type ruletype,          ar.description description,          (select group_concat(occured_event_id separator ', ')              alert_rule_event             alert_rule_id = ar.id) occuredeventids, alert_rule ar 

c# code:

alertruleentity.alertid = convert.toint32(dtalertruleentitylist.rows[index]["alertid"]); alertruleentity.ruleid = convert.toint32(dtalertruleentitylist.rows[index]["ruleid"]); alertruleentity.rulename = convert.tostring(dtalertruleentitylist.rows[index]["rulename"]); alertruleentity.ruletype = convert.tostring(dtalertruleentitylist.rows[index]["ruletype"]); alertruleentity.description = convert.tostring(dtalertruleentitylist.rows[index]["description"]); alertruleentity.occuredeventids = convert.tostring(dtalertruleentitylist.rows[index]["occuredeventids"]); 

it returning values follows:

enter image description here

it able read column values properly. in case of column occuredeventids giving value system.byte[] rather actual value. problem?

after making following change procedure worked:

(select group_concat(convert(occured_event_id, char(8)) separator ', ')  alert_rule_event alert_rule_id = ar.id) occuredeventids 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -