how to store image from datatable to another datatable

  • Thread starter Thread starter engahmedbarbary
  • Start date Start date
E

engahmedbarbary

Guest
Problem

How to store Image from datatble to another datatable ?

I have table Members have field MemberImage datatype on sql server 2014 is varbinary(max)

I have datatable dtDisplayDataPayment this datatable have data from sql query as

select MemberCode,SpecialCode,Name,MemberImage from members

i retrieve all data and put in another datatable except image

How to get or store image on another datatable ?

you can see here on code symbole ??? to know what i need


string sql= select MemberCode,SpecialCode,Name,MemberImage from members

DataTable dtDisplayDataPayment= DataAccess.ExecuteDataTable(sql);

public DataTable GetChecked()
{
DataTable table = new DataTable();
table.Columns.Add("MemberCode", typeof(string));
table.Columns.Add("SpecialCode", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Columns.Add("MemberImage", typeof(???????));









for (int i = 0; i < dtDisplayDataPayment.Rows.Count; i++)
{

bool Ischecked = Convert.ToBoolean(GridFooter.Rows.Cells["PrintFlag"].Value);
if (Ischecked == true)
{
DataRow newRow = table.NewRow();
newRow["MemberCode"] = Utilities.ObjectConverter.ConvertToString(dtDisplayDataPayment.Rows["MemberCode"]);
newRow["SpecialCode"] = Utilities.ObjectConverter.ConvertToString(dtDisplayDataPayment.Rows["SpecialCode"]);
newRow["Name"] = Utilities.ObjectConverter.ConvertToString(dtDisplayDataPayment.Rows["Name"]);
newRow["MemberImage"] = here what i convert ?????????(dtDisplayDataPayment.Rows["MemberImage"]);

table.Rows.Add(newRow);
}
}

return table;


}

Continue reading...
 
Back
Top